{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b32175a7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd \n",
    "import sklearn.tree as tree\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.datasets import load_wine  # 导入红酒数据集合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7f1bd657",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': array([[1.423e+01, 1.710e+00, 2.430e+00, ..., 1.040e+00, 3.920e+00,\n",
       "         1.065e+03],\n",
       "        [1.320e+01, 1.780e+00, 2.140e+00, ..., 1.050e+00, 3.400e+00,\n",
       "         1.050e+03],\n",
       "        [1.316e+01, 2.360e+00, 2.670e+00, ..., 1.030e+00, 3.170e+00,\n",
       "         1.185e+03],\n",
       "        ...,\n",
       "        [1.327e+01, 4.280e+00, 2.260e+00, ..., 5.900e-01, 1.560e+00,\n",
       "         8.350e+02],\n",
       "        [1.317e+01, 2.590e+00, 2.370e+00, ..., 6.000e-01, 1.620e+00,\n",
       "         8.400e+02],\n",
       "        [1.413e+01, 4.100e+00, 2.740e+00, ..., 6.100e-01, 1.600e+00,\n",
       "         5.600e+02]]),\n",
       " 'target': array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,\n",
       "        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "        2, 2]),\n",
       " 'frame': None,\n",
       " 'target_names': array(['class_0', 'class_1', 'class_2'], dtype='<U7'),\n",
       " 'DESCR': '.. _wine_dataset:\\n\\nWine recognition dataset\\n------------------------\\n\\n**Data Set Characteristics:**\\n\\n    :Number of Instances: 178 (50 in each of three classes)\\n    :Number of Attributes: 13 numeric, predictive attributes and the class\\n    :Attribute Information:\\n \\t\\t- Alcohol\\n \\t\\t- Malic acid\\n \\t\\t- Ash\\n\\t\\t- Alcalinity of ash  \\n \\t\\t- Magnesium\\n\\t\\t- Total phenols\\n \\t\\t- Flavanoids\\n \\t\\t- Nonflavanoid phenols\\n \\t\\t- Proanthocyanins\\n\\t\\t- Color intensity\\n \\t\\t- Hue\\n \\t\\t- OD280/OD315 of diluted wines\\n \\t\\t- Proline\\n\\n    - class:\\n            - class_0\\n            - class_1\\n            - class_2\\n\\t\\t\\n    :Summary Statistics:\\n    \\n    ============================= ==== ===== ======= =====\\n                                   Min   Max   Mean     SD\\n    ============================= ==== ===== ======= =====\\n    Alcohol:                      11.0  14.8    13.0   0.8\\n    Malic Acid:                   0.74  5.80    2.34  1.12\\n    Ash:                          1.36  3.23    2.36  0.27\\n    Alcalinity of Ash:            10.6  30.0    19.5   3.3\\n    Magnesium:                    70.0 162.0    99.7  14.3\\n    Total Phenols:                0.98  3.88    2.29  0.63\\n    Flavanoids:                   0.34  5.08    2.03  1.00\\n    Nonflavanoid Phenols:         0.13  0.66    0.36  0.12\\n    Proanthocyanins:              0.41  3.58    1.59  0.57\\n    Colour Intensity:              1.3  13.0     5.1   2.3\\n    Hue:                          0.48  1.71    0.96  0.23\\n    OD280/OD315 of diluted wines: 1.27  4.00    2.61  0.71\\n    Proline:                       278  1680     746   315\\n    ============================= ==== ===== ======= =====\\n\\n    :Missing Attribute Values: None\\n    :Class Distribution: class_0 (59), class_1 (71), class_2 (48)\\n    :Creator: R.A. Fisher\\n    :Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)\\n    :Date: July, 1988\\n\\nThis is a copy of UCI ML Wine recognition datasets.\\nhttps://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data\\n\\nThe data is the results of a chemical analysis of wines grown in the same\\nregion in Italy by three different cultivators. There are thirteen different\\nmeasurements taken for different constituents found in the three types of\\nwine.\\n\\nOriginal Owners: \\n\\nForina, M. et al, PARVUS - \\nAn Extendible Package for Data Exploration, Classification and Correlation. \\nInstitute of Pharmaceutical and Food Analysis and Technologies,\\nVia Brigata Salerno, 16147 Genoa, Italy.\\n\\nCitation:\\n\\nLichman, M. (2013). UCI Machine Learning Repository\\n[https://archive.ics.uci.edu/ml]. Irvine, CA: University of California,\\nSchool of Information and Computer Science. \\n\\n.. topic:: References\\n\\n  (1) S. Aeberhard, D. Coomans and O. de Vel, \\n  Comparison of Classifiers in High Dimensional Settings, \\n  Tech. Rep. no. 92-02, (1992), Dept. of Computer Science and Dept. of  \\n  Mathematics and Statistics, James Cook University of North Queensland. \\n  (Also submitted to Technometrics). \\n\\n  The data was used with many others for comparing various \\n  classifiers. The classes are separable, though only RDA \\n  has achieved 100% correct classification. \\n  (RDA : 100%, QDA 99.4%, LDA 98.9%, 1NN 96.1% (z-transformed data)) \\n  (All results using the leave-one-out technique) \\n\\n  (2) S. Aeberhard, D. Coomans and O. de Vel, \\n  \"THE CLASSIFICATION PERFORMANCE OF RDA\" \\n  Tech. Rep. no. 92-01, (1992), Dept. of Computer Science and Dept. of \\n  Mathematics and Statistics, James Cook University of North Queensland. \\n  (Also submitted to Journal of Chemometrics).\\n',\n",
       " 'feature_names': ['alcohol',\n",
       "  'malic_acid',\n",
       "  'ash',\n",
       "  'alcalinity_of_ash',\n",
       "  'magnesium',\n",
       "  'total_phenols',\n",
       "  'flavanoids',\n",
       "  'nonflavanoid_phenols',\n",
       "  'proanthocyanins',\n",
       "  'color_intensity',\n",
       "  'hue',\n",
       "  'od280/od315_of_diluted_wines',\n",
       "  'proline']}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wine = load_wine()\n",
    "wine"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "eecf2f67",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.423e+01, 1.710e+00, 2.430e+00, ..., 1.040e+00, 3.920e+00,\n",
       "        1.065e+03],\n",
       "       [1.320e+01, 1.780e+00, 2.140e+00, ..., 1.050e+00, 3.400e+00,\n",
       "        1.050e+03],\n",
       "       [1.316e+01, 2.360e+00, 2.670e+00, ..., 1.030e+00, 3.170e+00,\n",
       "        1.185e+03],\n",
       "       ...,\n",
       "       [1.327e+01, 4.280e+00, 2.260e+00, ..., 5.900e-01, 1.560e+00,\n",
       "        8.350e+02],\n",
       "       [1.317e+01, 2.590e+00, 2.370e+00, ..., 6.000e-01, 1.620e+00,\n",
       "        8.400e+02],\n",
       "       [1.413e+01, 4.100e+00, 2.740e+00, ..., 6.100e-01, 1.600e+00,\n",
       "        5.600e+02]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wine.data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "5937e959",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n",
       "       2, 2])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wine.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "8edefe80",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.372e+01, 1.430e+00, 2.500e+00, ..., 8.900e-01, 2.870e+00,\n",
       "        1.285e+03],\n",
       "       [1.386e+01, 1.350e+00, 2.270e+00, ..., 1.010e+00, 3.550e+00,\n",
       "        1.045e+03],\n",
       "       [1.287e+01, 4.610e+00, 2.480e+00, ..., 5.400e-01, 1.860e+00,\n",
       "        6.250e+02],\n",
       "       ...,\n",
       "       [1.253e+01, 5.510e+00, 2.640e+00, ..., 8.200e-01, 1.690e+00,\n",
       "        5.150e+02],\n",
       "       [1.181e+01, 2.120e+00, 2.740e+00, ..., 9.500e-01, 2.260e+00,\n",
       "        6.250e+02],\n",
       "       [1.373e+01, 4.360e+00, 2.260e+00, ..., 7.800e-01, 1.750e+00,\n",
       "        5.200e+02]])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train,X_test,y_train,y_test = train_test_split(wine.data,wine.target,test_size=0.3)\n",
    "X_train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "1b088030",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 2 0 1 0 1 1 0 0 1 2 2 0 1\n",
      " 1 1 0 0 0 1 0 2 1 0 0 0 1 0 0 2 2]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.8888888888888888"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 建立模型，并预测\n",
    "clt = tree.DecisionTreeClassifier(criterion='entropy'  #不纯度，”entropy“表示信息熵，”gini“表示基尼系数\n",
    "                                  ,random_state=0)\n",
    "clt.fit(X_train,y_train)\n",
    "print(clt.predict(X_test))\n",
    "clt.score(X_test,y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "115dbb38",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"829pt\" height=\"671pt\"\r\n",
       " viewBox=\"0.00 0.00 829.00 671.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 667)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-667 825,-667 825,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#e1fbec\" stroke=\"black\" d=\"M426,-663C426,-663 171,-663 171,-663 165,-663 159,-657 159,-651 159,-651 159,-592 159,-592 159,-586 165,-580 171,-580 171,-580 426,-580 426,-580 432,-580 438,-586 438,-592 438,-592 438,-651 438,-651 438,-657 432,-663 426,-663\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"298.5\" y=\"-647.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">od280/od315_of_diluted_wines &lt;= 2.115</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298.5\" y=\"-632.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.559</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298.5\" y=\"-617.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298.5\" y=\"-602.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 52, 39]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"298.5\" y=\"-587.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#9253e8\" stroke=\"black\" d=\"M246,-544C246,-544 149,-544 149,-544 143,-544 137,-538 137,-532 137,-532 137,-473 137,-473 137,-467 143,-461 149,-461 149,-461 246,-461 246,-461 252,-461 258,-467 258,-473 258,-473 258,-532 258,-532 258,-538 252,-544 246,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">hue &lt;= 0.83</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.519</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 5, 38]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M263.459,-579.907C255.624,-570.832 247.241,-561.121 239.169,-551.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"241.663,-549.303 232.48,-544.021 236.365,-553.878 241.663,-549.303\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"230.65\" y=\"-565.254\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">True</text>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#c5f7da\" stroke=\"black\" d=\"M453,-544C453,-544 348,-544 348,-544 342,-544 336,-538 336,-532 336,-532 336,-473 336,-473 336,-467 342,-461 348,-461 348,-461 453,-461 453,-461 459,-461 465,-467 465,-473 465,-473 465,-532 465,-532 465,-538 459,-544 453,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proline &lt;= 760.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.062</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 81</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 47, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>0&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M333.888,-579.907C341.8,-570.832 350.266,-561.121 358.419,-551.769\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"361.241,-553.859 365.174,-544.021 355.965,-549.259 361.241,-553.859\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"366.882\" y=\"-565.262\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">False</text>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M109,-417.5C109,-417.5 12,-417.5 12,-417.5 6,-417.5 0,-411.5 0,-405.5 0,-405.5 0,-361.5 0,-361.5 0,-355.5 6,-349.5 12,-349.5 12,-349.5 109,-349.5 109,-349.5 115,-349.5 121,-355.5 121,-361.5 121,-361.5 121,-405.5 121,-405.5 121,-411.5 115,-417.5 109,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 35</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 35]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M149.969,-460.907C136.143,-449.101 121.057,-436.217 107.279,-424.45\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"109.214,-421.5 99.3365,-417.667 104.668,-426.823 109.214,-421.5\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#b0f5cd\" stroke=\"black\" d=\"M243.5,-425C243.5,-425 151.5,-425 151.5,-425 145.5,-425 139.5,-419 139.5,-413 139.5,-413 139.5,-354 139.5,-354 139.5,-348 145.5,-342 151.5,-342 151.5,-342 243.5,-342 243.5,-342 249.5,-342 255.5,-348 255.5,-354 255.5,-354 255.5,-413 255.5,-413 255.5,-419 249.5,-425 243.5,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">ash &lt;= 2.45</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.954</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 5, 3]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>1&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M197.5,-460.907C197.5,-452.649 197.5,-443.864 197.5,-435.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"201,-435.021 197.5,-425.021 194,-435.021 201,-435.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M110,-298.5C110,-298.5 19,-298.5 19,-298.5 13,-298.5 7,-292.5 7,-286.5 7,-286.5 7,-242.5 7,-242.5 7,-236.5 13,-230.5 19,-230.5 19,-230.5 110,-230.5 110,-230.5 116,-230.5 122,-236.5 122,-242.5 122,-242.5 122,-286.5 122,-286.5 122,-292.5 116,-298.5 110,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 5, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"64.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 3&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>3&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M151.356,-341.907C137.935,-330.101 123.289,-317.217 109.913,-305.45\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"112.023,-302.644 102.203,-298.667 107.399,-307.9 112.023,-302.644\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M243,-298.5C243,-298.5 152,-298.5 152,-298.5 146,-298.5 140,-292.5 140,-286.5 140,-286.5 140,-242.5 140,-242.5 140,-236.5 146,-230.5 152,-230.5 152,-230.5 243,-230.5 243,-230.5 249,-230.5 255,-236.5 255,-242.5 255,-242.5 255,-286.5 255,-286.5 255,-292.5 249,-298.5 243,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 3&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>3&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M197.5,-341.907C197.5,-331.204 197.5,-319.615 197.5,-308.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"201,-308.667 197.5,-298.667 194,-308.667 201,-308.667\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#41e686\" stroke=\"black\" d=\"M449.5,-425C449.5,-425 351.5,-425 351.5,-425 345.5,-425 339.5,-419 339.5,-413 339.5,-413 339.5,-354 339.5,-354 339.5,-348 345.5,-342 351.5,-342 351.5,-342 449.5,-342 449.5,-342 455.5,-342 461.5,-348 461.5,-354 461.5,-354 461.5,-413 461.5,-413 461.5,-419 455.5,-425 449.5,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">alcohol &lt;= 12.85</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.292</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 48</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 46, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"400.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 6&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>6&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M400.5,-460.907C400.5,-452.649 400.5,-443.864 400.5,-435.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"404,-435.021 400.5,-425.021 397,-435.021 404,-435.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#e6853f\" stroke=\"black\" d=\"M702,-425C702,-425 553,-425 553,-425 547,-425 541,-419 541,-413 541,-413 541,-354 541,-354 541,-348 547,-342 553,-342 553,-342 702,-342 702,-342 708,-342 714,-348 714,-354 714,-354 714,-413 714,-413 714,-419 708,-425 702,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">alcalinity_of_ash &lt;= 27.5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.196</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 33</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [32, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 6&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>6&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M465.245,-468.129C488.354,-456.218 514.792,-442.592 539.525,-429.844\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"541.265,-432.884 548.551,-425.192 538.058,-426.662 541.265,-432.884\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M382,-298.5C382,-298.5 285,-298.5 285,-298.5 279,-298.5 273,-292.5 273,-286.5 273,-286.5 273,-242.5 273,-242.5 273,-236.5 279,-230.5 285,-230.5 285,-230.5 382,-230.5 382,-230.5 388,-230.5 394,-236.5 394,-242.5 394,-242.5 394,-286.5 394,-286.5 394,-292.5 388,-298.5 382,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"333.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"333.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 43</text>\r\n",
       "<text text-anchor=\"middle\" x=\"333.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 43, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"333.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 7&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>7&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M377.255,-341.907C370.873,-330.763 363.941,-318.658 357.516,-307.439\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"360.5,-305.606 352.493,-298.667 354.425,-309.084 360.5,-305.606\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#9cf2c0\" stroke=\"black\" d=\"M537,-306C537,-306 424,-306 424,-306 418,-306 412,-300 412,-294 412,-294 412,-235 412,-235 412,-229 418,-223 424,-223 424,-223 537,-223 537,-223 543,-223 549,-229 549,-235 549,-235 549,-294 549,-294 549,-300 543,-306 537,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"480.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">malic_acid &lt;= 2.16</text>\r\n",
       "<text text-anchor=\"middle\" x=\"480.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.371</text>\r\n",
       "<text text-anchor=\"middle\" x=\"480.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\r\n",
       "<text text-anchor=\"middle\" x=\"480.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 3, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"480.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 7&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>7&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M428.256,-341.907C434.337,-333.014 440.836,-323.509 447.111,-314.331\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"450.038,-316.251 452.793,-306.021 444.26,-312.3 450.038,-316.251\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M434,-179.5C434,-179.5 343,-179.5 343,-179.5 337,-179.5 331,-173.5 331,-167.5 331,-167.5 331,-123.5 331,-123.5 331,-117.5 337,-111.5 343,-111.5 343,-111.5 434,-111.5 434,-111.5 440,-111.5 446,-117.5 446,-123.5 446,-123.5 446,-167.5 446,-167.5 446,-173.5 440,-179.5 434,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"388.5\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"388.5\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"388.5\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"388.5\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>9&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M448.581,-222.907C439.644,-211.542 429.922,-199.178 420.955,-187.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"423.513,-185.364 414.58,-179.667 418.01,-189.691 423.513,-185.364\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M667,-187C667,-187 476,-187 476,-187 470,-187 464,-181 464,-175 464,-175 464,-116 464,-116 464,-110 470,-104 476,-104 476,-104 667,-104 667,-104 673,-104 679,-110 679,-116 679,-116 679,-175 679,-175 679,-181 673,-187 667,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"571.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">nonflavanoid_phenols &lt;= 0.425</text>\r\n",
       "<text text-anchor=\"middle\" x=\"571.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"571.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"571.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"571.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 9&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>9&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M512.072,-222.907C519.06,-213.923 526.533,-204.315 533.739,-195.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"536.607,-197.063 539.984,-187.021 531.082,-192.766 536.607,-197.063\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M550,-68C550,-68 459,-68 459,-68 453,-68 447,-62 447,-56 447,-56 447,-12 447,-12 447,-6 453,-0 459,-0 459,-0 550,-0 550,-0 556,-0 562,-6 562,-12 562,-12 562,-56 562,-56 562,-62 556,-68 550,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"504.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"504.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"504.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"504.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 11&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>11&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M546.552,-103.726C541.194,-94.9703 535.524,-85.7032 530.141,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"533.08,-75.0028 524.875,-68.2996 527.109,-78.6563 533.08,-75.0028\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M683,-68C683,-68 592,-68 592,-68 586,-68 580,-62 580,-56 580,-56 580,-12 580,-12 580,-6 586,-0 592,-0 592,-0 683,-0 683,-0 689,-0 695,-6 695,-12 695,-12 695,-56 695,-56 695,-62 689,-68 683,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"637.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"637.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"637.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"637.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 11&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>11&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M596.076,-103.726C601.354,-94.9703 606.939,-85.7032 612.242,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"615.264,-78.671 617.429,-68.2996 609.269,-75.0574 615.264,-78.671\"/>\r\n",
       "</g>\r\n",
       "<!-- 15 -->\r\n",
       "<g id=\"node16\" class=\"node\"><title>15</title>\r\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M676,-298.5C676,-298.5 579,-298.5 579,-298.5 573,-298.5 567,-292.5 567,-286.5 567,-286.5 567,-242.5 567,-242.5 567,-236.5 573,-230.5 579,-230.5 579,-230.5 676,-230.5 676,-230.5 682,-230.5 688,-236.5 688,-242.5 688,-242.5 688,-286.5 688,-286.5 688,-292.5 682,-298.5 676,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 32</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [32, 0, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"627.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 14&#45;&gt;15 -->\r\n",
       "<g id=\"edge15\" class=\"edge\"><title>14&#45;&gt;15</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M627.5,-341.907C627.5,-331.204 627.5,-319.615 627.5,-308.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"631,-308.667 627.5,-298.667 624,-308.667 631,-308.667\"/>\r\n",
       "</g>\r\n",
       "<!-- 16 -->\r\n",
       "<g id=\"node17\" class=\"node\"><title>16</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M809,-298.5C809,-298.5 718,-298.5 718,-298.5 712,-298.5 706,-292.5 706,-286.5 706,-286.5 706,-242.5 706,-242.5 706,-236.5 712,-230.5 718,-230.5 718,-230.5 809,-230.5 809,-230.5 815,-230.5 821,-236.5 821,-242.5 821,-242.5 821,-286.5 821,-286.5 821,-292.5 815,-298.5 809,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"763.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"763.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"763.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"763.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 14&#45;&gt;16 -->\r\n",
       "<g id=\"edge16\" class=\"edge\"><title>14&#45;&gt;16</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M674.685,-341.907C688.409,-330.101 703.385,-317.217 717.063,-305.45\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"719.649,-307.842 724.947,-298.667 715.084,-302.535 719.649,-307.842\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x23b52e20430>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 画出决策树\n",
    "import graphviz\n",
    "dot_data = tree.export_graphviz(clt\n",
    "                   ,feature_names = wine.feature_names\n",
    "                   ,class_names = wine.target_names\n",
    "                   , filled = True  #填充框的颜色\n",
    "                   ,rounded = True  #框的形状\n",
    "                               )\n",
    "graph = graphviz.Source(dot_data)\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "36176604",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.03693498, 0.02511489, 0.03950027, 0.03344514, 0.        ,\n",
       "       0.        , 0.        , 0.01034652, 0.        , 0.        ,\n",
       "       0.07585562, 0.43975858, 0.33904401])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clt.feature_importances_  #每个特征所的重要性，所作出的贡献"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "dc1b5b07",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('alcohol', 0.036934977583892914),\n",
       " ('malic_acid', 0.025114889552399943),\n",
       " ('ash', 0.03950026657243612),\n",
       " ('alcalinity_of_ash', 0.03344514356067571),\n",
       " ('magnesium', 0.0),\n",
       " ('total_phenols', 0.0),\n",
       " ('flavanoids', 0.0),\n",
       " ('nonflavanoid_phenols', 0.010346515959035234),\n",
       " ('proanthocyanins', 0.0),\n",
       " ('color_intensity', 0.0),\n",
       " ('hue', 0.0758556185527009),\n",
       " ('od280/od315_of_diluted_wines', 0.43975857792697987),\n",
       " ('proline', 0.3390440102918793)]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(zip(wine.feature_names,clt.feature_importances_))\n",
    "[*zip(wine.feature_names,clt.feature_importances_)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "78536885",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 2 1 0 0 0 0 2 0 1 0 1 1 1 0 2 1 2 0 1\n",
      " 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 2 2]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.8518518518518519"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#加上splitter参数\n",
    "clt = tree.DecisionTreeClassifier(criterion='entropy'  #不纯度，”entropy“表示信息熵，”gini“表示基尼系数\n",
    "                                  ,random_state=30\n",
    "                                 ,splitter='random' #也是控制决策树随机的选项，有best，random\n",
    "                                 )\n",
    "clt.fit(X_train,y_train)\n",
    "print(clt.predict(X_test))\n",
    "clt.score(X_test,y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e70cbcc9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"1457pt\" height=\"909pt\"\r\n",
       " viewBox=\"0.00 0.00 1457.00 909.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 905)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-905 1453,-905 1453,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#e1fbec\" stroke=\"black\" d=\"M775,-901C775,-901 658,-901 658,-901 652,-901 646,-895 646,-889 646,-889 646,-830 646,-830 646,-824 652,-818 658,-818 658,-818 775,-818 775,-818 781,-818 787,-824 787,-830 787,-830 787,-889 787,-889 787,-895 781,-901 775,-901\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"716.5\" y=\"-885.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">flavanoids &lt;= 1.714</text>\r\n",
       "<text text-anchor=\"middle\" x=\"716.5\" y=\"-870.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.559</text>\r\n",
       "<text text-anchor=\"middle\" x=\"716.5\" y=\"-855.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"716.5\" y=\"-840.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 52, 39]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"716.5\" y=\"-825.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#be99f2\" stroke=\"black\" d=\"M706,-782C706,-782 451,-782 451,-782 445,-782 439,-776 439,-770 439,-770 439,-711 439,-711 439,-705 445,-699 451,-699 451,-699 706,-699 706,-699 712,-699 718,-705 718,-711 718,-711 718,-770 718,-770 718,-776 712,-782 706,-782\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-766.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">od280/od315_of_diluted_wines &lt;= 2.124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-751.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.912</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-736.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 58</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-721.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 19, 39]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-706.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M668.622,-817.907C657.489,-808.469 645.546,-798.343 634.112,-788.649\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"636.185,-785.818 626.294,-782.021 631.658,-791.157 636.185,-785.818\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"628.346\" y=\"-803.236\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">True</text>\r\n",
       "</g>\r\n",
       "<!-- 18 -->\r\n",
       "<g id=\"node19\" class=\"node\"><title>18</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M919,-782C919,-782 792,-782 792,-782 786,-782 780,-776 780,-770 780,-770 780,-711 780,-711 780,-705 786,-699 792,-699 792,-699 919,-699 919,-699 925,-699 931,-705 931,-711 931,-711 931,-770 931,-770 931,-776 925,-782 919,-782\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-766.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">magnesium &lt;= 91.49</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-751.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-736.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 66</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-721.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 33, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-706.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;18 -->\r\n",
       "<g id=\"edge18\" class=\"edge\"><title>0&#45;&gt;18</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M764.725,-817.907C775.938,-808.469 787.969,-798.343 799.485,-788.649\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"801.963,-791.138 807.36,-782.021 797.455,-785.783 801.963,-791.138\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"805.219\" y=\"-803.229\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">False</text>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#9558e9\" stroke=\"black\" d=\"M416,-663C416,-663 319,-663 319,-663 313,-663 307,-657 307,-651 307,-651 307,-592 307,-592 307,-586 313,-580 319,-580 319,-580 416,-580 416,-580 422,-580 428,-586 428,-592 428,-592 428,-651 428,-651 428,-657 422,-663 416,-663\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-647.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">hue &lt;= 0.95</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-632.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.575</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-617.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 44</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-602.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 6, 38]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-587.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M505.295,-698.907C483.221,-686.668 459.06,-673.27 437.22,-661.16\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"438.779,-658.022 428.336,-656.234 435.385,-664.144 438.779,-658.022\"/>\r\n",
       "</g>\r\n",
       "<!-- 15 -->\r\n",
       "<g id=\"node16\" class=\"node\"><title>15</title>\r\n",
       "<path fill=\"#48e78b\" stroke=\"black\" d=\"M627,-663C627,-663 530,-663 530,-663 524,-663 518,-657 518,-651 518,-651 518,-592 518,-592 518,-586 524,-580 530,-580 530,-580 627,-580 627,-580 633,-580 639,-586 639,-592 639,-592 639,-651 639,-651 639,-657 633,-663 627,-663\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-647.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">hue &lt;= 0.801</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-632.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.371</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-617.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-602.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"578.5\" y=\"-587.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;15 -->\r\n",
       "<g id=\"edge15\" class=\"edge\"><title>1&#45;&gt;15</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M578.5,-698.907C578.5,-690.649 578.5,-681.864 578.5,-673.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"582,-673.021 578.5,-663.021 575,-673.021 582,-673.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#8b49e7\" stroke=\"black\" d=\"M247,-544C247,-544 130,-544 130,-544 124,-544 118,-538 118,-532 118,-532 118,-473 118,-473 118,-467 124,-461 130,-461 130,-461 247,-461 247,-461 253,-461 259,-467 259,-473 259,-473 259,-532 259,-532 259,-538 253,-544 247,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"188.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">flavanoids &lt;= 0.761</text>\r\n",
       "<text text-anchor=\"middle\" x=\"188.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.384</text>\r\n",
       "<text text-anchor=\"middle\" x=\"188.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 40</text>\r\n",
       "<text text-anchor=\"middle\" x=\"188.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 37]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"188.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M306.899,-580.889C291.581,-570.877 274.997,-560.037 259.228,-549.73\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"260.849,-546.609 250.564,-544.067 257.02,-552.468 260.849,-546.609\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#7beeab\" stroke=\"black\" d=\"M445.5,-544C445.5,-544 289.5,-544 289.5,-544 283.5,-544 277.5,-538 277.5,-532 277.5,-532 277.5,-473 277.5,-473 277.5,-467 283.5,-461 289.5,-461 289.5,-461 445.5,-461 445.5,-461 451.5,-461 457.5,-467 457.5,-473 457.5,-473 457.5,-532 457.5,-532 457.5,-538 451.5,-544 445.5,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proanthocyanins &lt;= 0.657</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"367.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>2&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M367.5,-579.907C367.5,-571.649 367.5,-562.864 367.5,-554.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"371,-554.021 367.5,-544.021 364,-554.021 371,-554.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M109,-417.5C109,-417.5 12,-417.5 12,-417.5 6,-417.5 0,-411.5 0,-405.5 0,-405.5 0,-361.5 0,-361.5 0,-355.5 6,-349.5 12,-349.5 12,-349.5 109,-349.5 109,-349.5 115,-349.5 121,-355.5 121,-361.5 121,-361.5 121,-405.5 121,-405.5 121,-411.5 115,-417.5 109,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 23</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 23]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 3&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>3&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M144.091,-460.907C131.174,-449.101 117.079,-436.217 104.205,-424.45\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"106.528,-421.83 96.7852,-417.667 101.805,-426.997 106.528,-421.83\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#9c63eb\" stroke=\"black\" d=\"M248,-425C248,-425 151,-425 151,-425 145,-425 139,-419 139,-413 139,-413 139,-354 139,-354 139,-348 145,-342 151,-342 151,-342 248,-342 248,-342 254,-342 260,-348 260,-354 260,-354 260,-413 260,-413 260,-419 254,-425 248,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"199.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">hue &lt;= 0.617</text>\r\n",
       "<text text-anchor=\"middle\" x=\"199.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.672</text>\r\n",
       "<text text-anchor=\"middle\" x=\"199.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 17</text>\r\n",
       "<text text-anchor=\"middle\" x=\"199.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 14]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"199.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 3&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>3&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M192.316,-460.907C193.101,-452.558 193.937,-443.671 194.75,-435.02\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"198.239,-435.305 195.69,-425.021 191.27,-434.649 198.239,-435.305\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M154,-298.5C154,-298.5 63,-298.5 63,-298.5 57,-298.5 51,-292.5 51,-286.5 51,-286.5 51,-242.5 51,-242.5 51,-236.5 57,-230.5 63,-230.5 63,-230.5 154,-230.5 154,-230.5 160,-230.5 166,-236.5 166,-242.5 166,-242.5 166,-286.5 166,-286.5 166,-292.5 160,-298.5 154,-298.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"108.5\" y=\"-283.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"108.5\" y=\"-268.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"108.5\" y=\"-253.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 8]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"108.5\" y=\"-238.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M167.928,-341.907C159.088,-330.542 149.472,-318.178 140.602,-306.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"143.199,-304.412 134.297,-298.667 137.673,-308.709 143.199,-304.412\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#c09cf2\" stroke=\"black\" d=\"M387,-306C387,-306 196,-306 196,-306 190,-306 184,-300 184,-294 184,-294 184,-235 184,-235 184,-229 190,-223 196,-223 196,-223 387,-223 387,-223 393,-223 399,-229 399,-235 399,-235 399,-294 399,-294 399,-300 393,-306 387,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"291.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">nonflavanoid_phenols &lt;= 0.412</text>\r\n",
       "<text text-anchor=\"middle\" x=\"291.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\r\n",
       "<text text-anchor=\"middle\" x=\"291.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 9</text>\r\n",
       "<text text-anchor=\"middle\" x=\"291.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 6]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"291.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M231.419,-341.907C238.484,-332.923 246.039,-323.315 253.324,-314.05\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"256.208,-316.045 259.637,-306.021 250.705,-311.718 256.208,-316.045\"/>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#965ae9\" stroke=\"black\" d=\"M286.5,-187C286.5,-187 130.5,-187 130.5,-187 124.5,-187 118.5,-181 118.5,-175 118.5,-175 118.5,-116 118.5,-116 118.5,-110 124.5,-104 130.5,-104 130.5,-104 286.5,-104 286.5,-104 292.5,-104 298.5,-110 298.5,-116 298.5,-116 298.5,-175 298.5,-175 298.5,-181 292.5,-187 286.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"208.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proanthocyanins &lt;= 1.152</text>\r\n",
       "<text text-anchor=\"middle\" x=\"208.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.592</text>\r\n",
       "<text text-anchor=\"middle\" x=\"208.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 7</text>\r\n",
       "<text text-anchor=\"middle\" x=\"208.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 6]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"208.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 7&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>7&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M262.704,-222.907C256.394,-214.014 249.652,-204.509 243.141,-195.331\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"245.886,-193.152 237.246,-187.021 240.177,-197.202 245.886,-193.152\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M420,-179.5C420,-179.5 329,-179.5 329,-179.5 323,-179.5 317,-173.5 317,-167.5 317,-167.5 317,-123.5 317,-123.5 317,-117.5 323,-111.5 329,-111.5 329,-111.5 420,-111.5 420,-111.5 426,-111.5 432,-117.5 432,-123.5 432,-123.5 432,-167.5 432,-167.5 432,-173.5 426,-179.5 420,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"374.5\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374.5\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374.5\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"374.5\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 7&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>7&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M320.296,-222.907C328.281,-211.652 336.96,-199.418 344.984,-188.106\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"348.04,-189.848 350.971,-179.667 342.331,-185.798 348.04,-189.848\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M188,-68C188,-68 97,-68 97,-68 91,-68 85,-62 85,-56 85,-56 85,-12 85,-12 85,-6 91,-0 97,-0 97,-0 188,-0 188,-0 194,-0 200,-6 200,-12 200,-12 200,-56 200,-56 200,-62 194,-68 188,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 6]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"142.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M183.924,-103.726C178.646,-94.9703 173.061,-85.7032 167.758,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"170.731,-75.0574 162.571,-68.2996 164.736,-78.671 170.731,-75.0574\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M321,-68C321,-68 230,-68 230,-68 224,-68 218,-62 218,-56 218,-56 218,-12 218,-12 218,-6 224,-0 230,-0 230,-0 321,-0 321,-0 327,-0 333,-6 333,-12 333,-12 333,-56 333,-56 333,-62 327,-68 321,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"275.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"275.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"275.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"275.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>8&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M233.448,-103.726C238.806,-94.9703 244.476,-85.7032 249.859,-76.9051\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"252.891,-78.6563 255.125,-68.2996 246.92,-75.0028 252.891,-78.6563\"/>\r\n",
       "</g>\r\n",
       "<!-- 13 -->\r\n",
       "<g id=\"node14\" class=\"node\"><title>13</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M402,-417.5C402,-417.5 311,-417.5 311,-417.5 305,-417.5 299,-411.5 299,-405.5 299,-405.5 299,-361.5 299,-361.5 299,-355.5 305,-349.5 311,-349.5 311,-349.5 402,-349.5 402,-349.5 408,-349.5 414,-355.5 414,-361.5 414,-361.5 414,-405.5 414,-405.5 414,-411.5 408,-417.5 402,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"356.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"356.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\r\n",
       "<text text-anchor=\"middle\" x=\"356.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"356.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;13 -->\r\n",
       "<g id=\"edge13\" class=\"edge\"><title>12&#45;&gt;13</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M363.684,-460.907C362.677,-450.204 361.588,-438.615 360.569,-427.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"364.039,-427.295 359.618,-417.667 357.07,-427.951 364.039,-427.295\"/>\r\n",
       "</g>\r\n",
       "<!-- 14 -->\r\n",
       "<g id=\"node15\" class=\"node\"><title>14</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M535,-417.5C535,-417.5 444,-417.5 444,-417.5 438,-417.5 432,-411.5 432,-405.5 432,-405.5 432,-361.5 432,-361.5 432,-355.5 438,-349.5 444,-349.5 444,-349.5 535,-349.5 535,-349.5 541,-349.5 547,-355.5 547,-361.5 547,-361.5 547,-405.5 547,-405.5 547,-411.5 541,-417.5 535,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"489.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"489.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"489.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"489.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 12&#45;&gt;14 -->\r\n",
       "<g id=\"edge14\" class=\"edge\"><title>12&#45;&gt;14</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M409.827,-460.907C422.024,-449.211 435.322,-436.457 447.499,-424.78\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"450.121,-427.115 454.916,-417.667 445.276,-422.062 450.121,-427.115\"/>\r\n",
       "</g>\r\n",
       "<!-- 16 -->\r\n",
       "<g id=\"node17\" class=\"node\"><title>16</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M579,-536.5C579,-536.5 488,-536.5 488,-536.5 482,-536.5 476,-530.5 476,-524.5 476,-524.5 476,-480.5 476,-480.5 476,-474.5 482,-468.5 488,-468.5 488,-468.5 579,-468.5 579,-468.5 585,-468.5 591,-474.5 591,-480.5 591,-480.5 591,-524.5 591,-524.5 591,-530.5 585,-536.5 579,-536.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"533.5\" y=\"-521.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"533.5\" y=\"-506.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"533.5\" y=\"-491.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"533.5\" y=\"-476.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 15&#45;&gt;16 -->\r\n",
       "<g id=\"edge16\" class=\"edge\"><title>15&#45;&gt;16</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M562.887,-579.907C558.686,-568.983 554.13,-557.137 549.887,-546.107\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"553.113,-544.744 546.257,-536.667 546.58,-547.257 553.113,-544.744\"/>\r\n",
       "</g>\r\n",
       "<!-- 17 -->\r\n",
       "<g id=\"node18\" class=\"node\"><title>17</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M718,-536.5C718,-536.5 621,-536.5 621,-536.5 615,-536.5 609,-530.5 609,-524.5 609,-524.5 609,-480.5 609,-480.5 609,-474.5 615,-468.5 621,-468.5 621,-468.5 718,-468.5 718,-468.5 724,-468.5 730,-474.5 730,-480.5 730,-480.5 730,-524.5 730,-524.5 730,-530.5 724,-536.5 718,-536.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"669.5\" y=\"-521.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"669.5\" y=\"-506.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"669.5\" y=\"-491.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"669.5\" y=\"-476.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 15&#45;&gt;17 -->\r\n",
       "<g id=\"edge17\" class=\"edge\"><title>15&#45;&gt;17</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M610.072,-579.907C618.912,-568.542 628.528,-556.178 637.398,-544.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"640.327,-546.709 643.703,-536.667 634.801,-542.412 640.327,-546.709\"/>\r\n",
       "</g>\r\n",
       "<!-- 19 -->\r\n",
       "<g id=\"node20\" class=\"node\"><title>19</title>\r\n",
       "<path fill=\"#43e688\" stroke=\"black\" d=\"M912,-663C912,-663 799,-663 799,-663 793,-663 787,-657 787,-651 787,-651 787,-592 787,-592 787,-586 793,-580 799,-580 799,-580 912,-580 912,-580 918,-580 924,-586 924,-592 924,-592 924,-651 924,-651 924,-657 918,-663 912,-663\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-647.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proline &lt;= 816.441</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-632.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.286</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-617.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 20</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-602.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 19, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"855.5\" y=\"-587.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 18&#45;&gt;19 -->\r\n",
       "<g id=\"edge19\" class=\"edge\"><title>18&#45;&gt;19</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M855.5,-698.907C855.5,-690.649 855.5,-681.864 855.5,-673.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"859,-673.021 855.5,-663.021 852,-673.021 859,-673.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 22 -->\r\n",
       "<g id=\"node23\" class=\"node\"><title>22</title>\r\n",
       "<path fill=\"#f0b890\" stroke=\"black\" d=\"M1142,-663C1142,-663 1035,-663 1035,-663 1029,-663 1023,-657 1023,-651 1023,-651 1023,-592 1023,-592 1023,-586 1029,-580 1035,-580 1035,-580 1142,-580 1142,-580 1148,-580 1154,-586 1154,-592 1154,-592 1154,-651 1154,-651 1154,-657 1148,-663 1142,-663\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-647.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">alcohol &lt;= 12.867</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-632.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.887</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-617.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 46</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-602.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [32, 14, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-587.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 18&#45;&gt;22 -->\r\n",
       "<g id=\"edge22\" class=\"edge\"><title>18&#45;&gt;22</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M931.148,-701.513C957.536,-688.263 987.126,-673.404 1013.46,-660.179\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1015.27,-663.19 1022.63,-655.574 1012.13,-656.934 1015.27,-663.19\"/>\r\n",
       "</g>\r\n",
       "<!-- 20 -->\r\n",
       "<g id=\"node21\" class=\"node\"><title>20</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M857,-536.5C857,-536.5 760,-536.5 760,-536.5 754,-536.5 748,-530.5 748,-524.5 748,-524.5 748,-480.5 748,-480.5 748,-474.5 754,-468.5 760,-468.5 760,-468.5 857,-468.5 857,-468.5 863,-468.5 869,-474.5 869,-480.5 869,-480.5 869,-524.5 869,-524.5 869,-530.5 863,-536.5 857,-536.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"808.5\" y=\"-521.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"808.5\" y=\"-506.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 19</text>\r\n",
       "<text text-anchor=\"middle\" x=\"808.5\" y=\"-491.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 19, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"808.5\" y=\"-476.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 19&#45;&gt;20 -->\r\n",
       "<g id=\"edge20\" class=\"edge\"><title>19&#45;&gt;20</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M839.194,-579.907C834.805,-568.983 830.047,-557.137 825.616,-546.107\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"828.799,-544.642 821.823,-536.667 822.303,-547.251 828.799,-544.642\"/>\r\n",
       "</g>\r\n",
       "<!-- 21 -->\r\n",
       "<g id=\"node22\" class=\"node\"><title>21</title>\r\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M990,-536.5C990,-536.5 899,-536.5 899,-536.5 893,-536.5 887,-530.5 887,-524.5 887,-524.5 887,-480.5 887,-480.5 887,-474.5 893,-468.5 899,-468.5 899,-468.5 990,-468.5 990,-468.5 996,-468.5 1002,-474.5 1002,-480.5 1002,-480.5 1002,-524.5 1002,-524.5 1002,-530.5 996,-536.5 990,-536.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"944.5\" y=\"-521.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"944.5\" y=\"-506.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"944.5\" y=\"-491.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"944.5\" y=\"-476.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 19&#45;&gt;21 -->\r\n",
       "<g id=\"edge21\" class=\"edge\"><title>19&#45;&gt;21</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M886.378,-579.907C895.024,-568.542 904.428,-556.178 913.104,-544.774\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"916.002,-546.745 919.27,-536.667 910.43,-542.507 916.002,-546.745\"/>\r\n",
       "</g>\r\n",
       "<!-- 23 -->\r\n",
       "<g id=\"node24\" class=\"node\"><title>23</title>\r\n",
       "<path fill=\"#48e78b\" stroke=\"black\" d=\"M1145,-544C1145,-544 1032,-544 1032,-544 1026,-544 1020,-538 1020,-532 1020,-532 1020,-473 1020,-473 1020,-467 1026,-461 1032,-461 1032,-461 1145,-461 1145,-461 1151,-461 1157,-467 1157,-473 1157,-473 1157,-532 1157,-532 1157,-538 1151,-544 1145,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proline &lt;= 781.075</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.371</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 13, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1088.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 22&#45;&gt;23 -->\r\n",
       "<g id=\"edge23\" class=\"edge\"><title>22&#45;&gt;23</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1088.5,-579.907C1088.5,-571.649 1088.5,-562.864 1088.5,-554.302\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1092,-554.021 1088.5,-544.021 1085,-554.021 1092,-554.021\"/>\r\n",
       "</g>\r\n",
       "<!-- 26 -->\r\n",
       "<g id=\"node27\" class=\"node\"><title>26</title>\r\n",
       "<path fill=\"#e6853f\" stroke=\"black\" d=\"M1345.5,-544C1345.5,-544 1187.5,-544 1187.5,-544 1181.5,-544 1175.5,-538 1175.5,-532 1175.5,-532 1175.5,-473 1175.5,-473 1175.5,-467 1181.5,-461 1187.5,-461 1187.5,-461 1345.5,-461 1345.5,-461 1351.5,-461 1357.5,-467 1357.5,-473 1357.5,-473 1357.5,-532 1357.5,-532 1357.5,-538 1351.5,-544 1345.5,-544\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1266.5\" y=\"-528.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">alcalinity_of_ash &lt;= 25.15</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1266.5\" y=\"-513.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.201</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1266.5\" y=\"-498.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 32</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1266.5\" y=\"-483.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [31, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1266.5\" y=\"-468.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 22&#45;&gt;26 -->\r\n",
       "<g id=\"edge26\" class=\"edge\"><title>22&#45;&gt;26</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1150.26,-579.907C1165.17,-570.106 1181.21,-559.563 1196.47,-549.533\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1198.42,-552.438 1204.85,-544.021 1194.57,-546.589 1198.42,-552.438\"/>\r\n",
       "</g>\r\n",
       "<!-- 24 -->\r\n",
       "<g id=\"node25\" class=\"node\"><title>24</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M1011,-417.5C1011,-417.5 914,-417.5 914,-417.5 908,-417.5 902,-411.5 902,-405.5 902,-405.5 902,-361.5 902,-361.5 902,-355.5 908,-349.5 914,-349.5 914,-349.5 1011,-349.5 1011,-349.5 1017,-349.5 1023,-355.5 1023,-361.5 1023,-361.5 1023,-405.5 1023,-405.5 1023,-411.5 1017,-417.5 1011,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"962.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"962.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"962.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"962.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 23&#45;&gt;24 -->\r\n",
       "<g id=\"edge24\" class=\"edge\"><title>23&#45;&gt;24</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1044.78,-460.907C1032.19,-449.211 1018.45,-436.457 1005.88,-424.78\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1007.93,-421.907 998.218,-417.667 1003.16,-427.036 1007.93,-421.907\"/>\r\n",
       "</g>\r\n",
       "<!-- 25 -->\r\n",
       "<g id=\"node26\" class=\"node\"><title>25</title>\r\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M1144,-417.5C1144,-417.5 1053,-417.5 1053,-417.5 1047,-417.5 1041,-411.5 1041,-405.5 1041,-405.5 1041,-361.5 1041,-361.5 1041,-355.5 1047,-349.5 1053,-349.5 1053,-349.5 1144,-349.5 1144,-349.5 1150,-349.5 1156,-355.5 1156,-361.5 1156,-361.5 1156,-405.5 1156,-405.5 1156,-411.5 1150,-417.5 1144,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1098.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1098.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1098.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1098.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 23&#45;&gt;25 -->\r\n",
       "<g id=\"edge25\" class=\"edge\"><title>23&#45;&gt;25</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1091.97,-460.907C1092.88,-450.204 1093.87,-438.615 1094.8,-427.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1098.3,-427.929 1095.67,-417.667 1091.33,-427.333 1098.3,-427.929\"/>\r\n",
       "</g>\r\n",
       "<!-- 27 -->\r\n",
       "<g id=\"node28\" class=\"node\"><title>27</title>\r\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M1304,-417.5C1304,-417.5 1207,-417.5 1207,-417.5 1201,-417.5 1195,-411.5 1195,-405.5 1195,-405.5 1195,-361.5 1195,-361.5 1195,-355.5 1201,-349.5 1207,-349.5 1207,-349.5 1304,-349.5 1304,-349.5 1310,-349.5 1316,-355.5 1316,-361.5 1316,-361.5 1316,-405.5 1316,-405.5 1316,-411.5 1310,-417.5 1304,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1255.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1255.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 31</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1255.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [31, 0, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1255.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 26&#45;&gt;27 -->\r\n",
       "<g id=\"edge27\" class=\"edge\"><title>26&#45;&gt;27</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1262.68,-460.907C1261.68,-450.204 1260.59,-438.615 1259.57,-427.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1263.04,-427.295 1258.62,-417.667 1256.07,-427.951 1263.04,-427.295\"/>\r\n",
       "</g>\r\n",
       "<!-- 28 -->\r\n",
       "<g id=\"node29\" class=\"node\"><title>28</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M1437,-417.5C1437,-417.5 1346,-417.5 1346,-417.5 1340,-417.5 1334,-411.5 1334,-405.5 1334,-405.5 1334,-361.5 1334,-361.5 1334,-355.5 1340,-349.5 1346,-349.5 1346,-349.5 1437,-349.5 1437,-349.5 1443,-349.5 1449,-355.5 1449,-361.5 1449,-361.5 1449,-405.5 1449,-405.5 1449,-411.5 1443,-417.5 1437,-417.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"1391.5\" y=\"-402.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1391.5\" y=\"-387.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1391.5\" y=\"-372.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"1391.5\" y=\"-357.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 26&#45;&gt;28 -->\r\n",
       "<g id=\"edge28\" class=\"edge\"><title>26&#45;&gt;28</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1309.87,-460.907C1322.36,-449.211 1335.99,-436.457 1348.47,-424.78\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1351.16,-427.056 1356.07,-417.667 1346.37,-421.945 1351.16,-427.056\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x23b52df7d90>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dot_data = tree.export_graphviz(clt\n",
    "                   ,feature_names = wine.feature_names\n",
    "                   ,class_names = wine.target_names\n",
    "                   , filled = True  #填充框的颜色\n",
    "                   ,rounded = True  #框的形状\n",
    "                               )\n",
    "graph = graphviz.Source(dot_data)\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "79a177fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 2 2 1 0 0 0 0 2 0 1 0 1 1 1 0 1 2 2 1 1\n",
      " 1 1 0 0 0 2 0 2 1 0 0 0 1 0 1 2 2]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.9814814814814815"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 加上剪枝参数\n",
    "clt = tree.DecisionTreeClassifier(criterion='entropy'  #不纯度，”entropy“表示信息熵，”gini“表示基尼系数\n",
    "                                  ,random_state=30\n",
    "                                 ,splitter='random' #也是控制决策树随机的选项，有best，random\n",
    "                                  ,max_depth=3  #限制树的最大深度，超过设定深度的树枝全部剪掉,建议从3开始尝试\n",
    "                            #    ,min_samples_leaf=5 #一个节点在分支后对子节点的这最少样本限定\n",
    "                                  ,min_samples_split= 10  #一个节点必须包含的最少样本个数，才被允许分支\n",
    "                                 )\n",
    "clt.fit(X_train,y_train)\n",
    "print(clt.predict(X_test))\n",
    "clt.score(X_test,y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "0a3ca806",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\r\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\r\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\r\n",
       "<!-- Generated by graphviz version 2.38.0 (20140413.2041)\r\n",
       " -->\r\n",
       "<!-- Title: Tree Pages: 1 -->\r\n",
       "<svg width=\"859pt\" height=\"433pt\"\r\n",
       " viewBox=\"0.00 0.00 859.00 433.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429)\">\r\n",
       "<title>Tree</title>\r\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-429 855,-429 855,4 -4,4\"/>\r\n",
       "<!-- 0 -->\r\n",
       "<g id=\"node1\" class=\"node\"><title>0</title>\r\n",
       "<path fill=\"#e1fbec\" stroke=\"black\" d=\"M509,-425C509,-425 392,-425 392,-425 386,-425 380,-419 380,-413 380,-413 380,-354 380,-354 380,-348 386,-342 392,-342 392,-342 509,-342 509,-342 515,-342 521,-348 521,-354 521,-354 521,-413 521,-413 521,-419 515,-425 509,-425\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"450.5\" y=\"-409.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">flavanoids &lt;= 1.714</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450.5\" y=\"-394.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.559</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450.5\" y=\"-379.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450.5\" y=\"-364.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 52, 39]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"450.5\" y=\"-349.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1 -->\r\n",
       "<g id=\"node2\" class=\"node\"><title>1</title>\r\n",
       "<path fill=\"#be99f2\" stroke=\"black\" d=\"M465,-306C465,-306 210,-306 210,-306 204,-306 198,-300 198,-294 198,-294 198,-235 198,-235 198,-229 204,-223 210,-223 210,-223 465,-223 465,-223 471,-223 477,-229 477,-235 477,-235 477,-294 477,-294 477,-300 471,-306 465,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"337.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">od280/od315_of_diluted_wines &lt;= 2.124</text>\r\n",
       "<text text-anchor=\"middle\" x=\"337.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.912</text>\r\n",
       "<text text-anchor=\"middle\" x=\"337.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 58</text>\r\n",
       "<text text-anchor=\"middle\" x=\"337.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 19, 39]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"337.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;1 -->\r\n",
       "<g id=\"edge1\" class=\"edge\"><title>0&#45;&gt;1</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M411.295,-341.907C402.443,-332.742 392.963,-322.927 383.848,-313.489\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"386.1,-310.782 376.635,-306.021 381.065,-315.645 386.1,-310.782\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"376.201\" y=\"-327.317\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">True</text>\r\n",
       "</g>\r\n",
       "<!-- 8 -->\r\n",
       "<g id=\"node9\" class=\"node\"><title>8</title>\r\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M620,-306C620,-306 507,-306 507,-306 501,-306 495,-300 495,-294 495,-294 495,-235 495,-235 495,-229 501,-223 507,-223 507,-223 620,-223 620,-223 626,-223 632,-229 632,-235 632,-235 632,-294 632,-294 632,-300 626,-306 620,-306\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"563.5\" y=\"-290.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">proline &lt;= 558.218</text>\r\n",
       "<text text-anchor=\"middle\" x=\"563.5\" y=\"-275.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"563.5\" y=\"-260.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 66</text>\r\n",
       "<text text-anchor=\"middle\" x=\"563.5\" y=\"-245.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 33, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"563.5\" y=\"-230.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 0&#45;&gt;8 -->\r\n",
       "<g id=\"edge8\" class=\"edge\"><title>0&#45;&gt;8</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M489.705,-341.907C498.557,-332.742 508.037,-322.927 517.152,-313.489\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"519.935,-315.645 524.365,-306.021 514.9,-310.782 519.935,-315.645\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"524.799\" y=\"-327.317\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">False</text>\r\n",
       "</g>\r\n",
       "<!-- 2 -->\r\n",
       "<g id=\"node3\" class=\"node\"><title>2</title>\r\n",
       "<path fill=\"#9558e9\" stroke=\"black\" d=\"M239,-187C239,-187 142,-187 142,-187 136,-187 130,-181 130,-175 130,-175 130,-116 130,-116 130,-110 136,-104 142,-104 142,-104 239,-104 239,-104 245,-104 251,-110 251,-116 251,-116 251,-175 251,-175 251,-181 245,-187 239,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"190.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">hue &lt;= 0.95</text>\r\n",
       "<text text-anchor=\"middle\" x=\"190.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.575</text>\r\n",
       "<text text-anchor=\"middle\" x=\"190.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 44</text>\r\n",
       "<text text-anchor=\"middle\" x=\"190.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 6, 38]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"190.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;2 -->\r\n",
       "<g id=\"edge2\" class=\"edge\"><title>1&#45;&gt;2</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M286.499,-222.907C274.527,-213.379 261.673,-203.148 249.387,-193.37\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"251.415,-190.51 241.411,-187.021 247.055,-195.987 251.415,-190.51\"/>\r\n",
       "</g>\r\n",
       "<!-- 5 -->\r\n",
       "<g id=\"node6\" class=\"node\"><title>5</title>\r\n",
       "<path fill=\"#48e78b\" stroke=\"black\" d=\"M425.5,-187C425.5,-187 281.5,-187 281.5,-187 275.5,-187 269.5,-181 269.5,-175 269.5,-175 269.5,-116 269.5,-116 269.5,-110 275.5,-104 281.5,-104 281.5,-104 425.5,-104 425.5,-104 431.5,-104 437.5,-110 437.5,-116 437.5,-116 437.5,-175 437.5,-175 437.5,-181 431.5,-187 425.5,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"353.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">color_intensity &lt;= 4.027</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.371</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 14</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"353.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 1&#45;&gt;5 -->\r\n",
       "<g id=\"edge5\" class=\"edge\"><title>1&#45;&gt;5</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M343.051,-222.907C344.193,-214.558 345.408,-205.671 346.591,-197.02\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"350.071,-197.403 347.959,-187.021 343.136,-196.454 350.071,-197.403\"/>\r\n",
       "</g>\r\n",
       "<!-- 3 -->\r\n",
       "<g id=\"node4\" class=\"node\"><title>3</title>\r\n",
       "<path fill=\"#8b49e7\" stroke=\"black\" d=\"M109,-68C109,-68 12,-68 12,-68 6,-68 0,-62 0,-56 0,-56 0,-12 0,-12 0,-6 6,-0 12,-0 12,-0 109,-0 109,-0 115,-0 121,-6 121,-12 121,-12 121,-56 121,-56 121,-62 115,-68 109,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.384</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 40</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 37]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"60.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;3 -->\r\n",
       "<g id=\"edge3\" class=\"edge\"><title>2&#45;&gt;3</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M142.093,-103.726C130.94,-94.3318 119.088,-84.349 107.975,-74.9883\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"109.937,-72.065 100.034,-68.2996 105.427,-77.4188 109.937,-72.065\"/>\r\n",
       "</g>\r\n",
       "<!-- 4 -->\r\n",
       "<g id=\"node5\" class=\"node\"><title>4</title>\r\n",
       "<path fill=\"#7beeab\" stroke=\"black\" d=\"M243.5,-68C243.5,-68 151.5,-68 151.5,-68 145.5,-68 139.5,-62 139.5,-56 139.5,-56 139.5,-12 139.5,-12 139.5,-6 145.5,-0 151.5,-0 151.5,-0 243.5,-0 243.5,-0 249.5,-0 255.5,-6 255.5,-12 255.5,-12 255.5,-56 255.5,-56 255.5,-62 249.5,-68 243.5,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"197.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 2&#45;&gt;4 -->\r\n",
       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;4</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M193.107,-103.726C193.637,-95.4263 194.197,-86.6671 194.733,-78.2834\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"198.226,-78.5025 195.371,-68.2996 191.24,-78.0559 198.226,-78.5025\"/>\r\n",
       "</g>\r\n",
       "<!-- 6 -->\r\n",
       "<g id=\"node7\" class=\"node\"><title>6</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M396,-68C396,-68 299,-68 299,-68 293,-68 287,-62 287,-56 287,-56 287,-12 287,-12 287,-6 293,-0 299,-0 299,-0 396,-0 396,-0 402,-0 408,-6 408,-12 408,-12 408,-56 408,-56 408,-62 402,-68 396,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"347.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"347.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;6 -->\r\n",
       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;6</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M351.266,-103.726C350.816,-95.5175 350.342,-86.8595 349.887,-78.56\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"353.367,-78.0931 349.325,-68.2996 346.377,-78.4761 353.367,-78.0931\"/>\r\n",
       "</g>\r\n",
       "<!-- 7 -->\r\n",
       "<g id=\"node8\" class=\"node\"><title>7</title>\r\n",
       "<path fill=\"#8139e5\" stroke=\"black\" d=\"M529,-68C529,-68 438,-68 438,-68 432,-68 426,-62 426,-56 426,-56 426,-12 426,-12 426,-6 432,-0 438,-0 438,-0 529,-0 529,-0 535,-0 541,-6 541,-12 541,-12 541,-56 541,-56 541,-62 535,-68 529,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"483.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"483.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\r\n",
       "<text text-anchor=\"middle\" x=\"483.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"483.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_2</text>\r\n",
       "</g>\r\n",
       "<!-- 5&#45;&gt;7 -->\r\n",
       "<g id=\"edge7\" class=\"edge\"><title>5&#45;&gt;7</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M401.907,-103.726C413.06,-94.3318 424.912,-84.349 436.025,-74.9883\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"438.573,-77.4188 443.966,-68.2996 434.063,-72.065 438.573,-77.4188\"/>\r\n",
       "</g>\r\n",
       "<!-- 9 -->\r\n",
       "<g id=\"node10\" class=\"node\"><title>9</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M596,-179.5C596,-179.5 499,-179.5 499,-179.5 493,-179.5 487,-173.5 487,-167.5 487,-167.5 487,-123.5 487,-123.5 487,-117.5 493,-111.5 499,-111.5 499,-111.5 596,-111.5 596,-111.5 602,-111.5 608,-117.5 608,-123.5 608,-123.5 608,-167.5 608,-167.5 608,-173.5 602,-179.5 596,-179.5\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"547.5\" y=\"-164.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"547.5\" y=\"-149.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 24</text>\r\n",
       "<text text-anchor=\"middle\" x=\"547.5\" y=\"-134.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 24, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"547.5\" y=\"-119.3\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;9 -->\r\n",
       "<g id=\"edge9\" class=\"edge\"><title>8&#45;&gt;9</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M557.949,-222.907C556.485,-212.204 554.9,-200.615 553.418,-189.776\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"556.858,-189.1 552.036,-179.667 549.923,-190.049 556.858,-189.1\"/>\r\n",
       "</g>\r\n",
       "<!-- 10 -->\r\n",
       "<g id=\"node11\" class=\"node\"><title>10</title>\r\n",
       "<path fill=\"#eca36f\" stroke=\"black\" d=\"M745,-187C745,-187 638,-187 638,-187 632,-187 626,-181 626,-175 626,-175 626,-116 626,-116 626,-110 632,-104 638,-104 638,-104 745,-104 745,-104 751,-104 757,-110 757,-116 757,-116 757,-175 757,-175 757,-181 751,-187 745,-187\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"691.5\" y=\"-171.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">alcohol &lt;= 12.725</text>\r\n",
       "<text text-anchor=\"middle\" x=\"691.5\" y=\"-156.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.75</text>\r\n",
       "<text text-anchor=\"middle\" x=\"691.5\" y=\"-141.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 42</text>\r\n",
       "<text text-anchor=\"middle\" x=\"691.5\" y=\"-126.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 9, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"691.5\" y=\"-111.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 8&#45;&gt;10 -->\r\n",
       "<g id=\"edge10\" class=\"edge\"><title>8&#45;&gt;10</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M607.909,-222.907C618.135,-213.56 629.1,-203.538 639.612,-193.929\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"642.15,-196.351 647.17,-187.021 637.427,-191.184 642.15,-196.351\"/>\r\n",
       "</g>\r\n",
       "<!-- 11 -->\r\n",
       "<g id=\"node12\" class=\"node\"><title>11</title>\r\n",
       "<path fill=\"#39e581\" stroke=\"black\" d=\"M700,-68C700,-68 609,-68 609,-68 603,-68 597,-62 597,-56 597,-56 597,-12 597,-12 597,-6 603,-0 609,-0 609,-0 700,-0 700,-0 706,-0 712,-6 712,-12 712,-12 712,-56 712,-56 712,-62 706,-68 700,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"654.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 8, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"654.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_1</text>\r\n",
       "</g>\r\n",
       "<!-- 10&#45;&gt;11 -->\r\n",
       "<g id=\"edge11\" class=\"edge\"><title>10&#45;&gt;11</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M677.723,-103.726C674.887,-95.3351 671.893,-86.4745 669.032,-78.0072\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"672.269,-76.6529 665.752,-68.2996 665.637,-78.8938 672.269,-76.6529\"/>\r\n",
       "</g>\r\n",
       "<!-- 12 -->\r\n",
       "<g id=\"node13\" class=\"node\"><title>12</title>\r\n",
       "<path fill=\"#e6853f\" stroke=\"black\" d=\"M839,-68C839,-68 742,-68 742,-68 736,-68 730,-62 730,-56 730,-56 730,-12 730,-12 730,-6 736,-0 742,-0 742,-0 839,-0 839,-0 845,-0 851,-6 851,-12 851,-12 851,-56 851,-56 851,-62 845,-68 839,-68\"/>\r\n",
       "<text text-anchor=\"middle\" x=\"790.5\" y=\"-52.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.191</text>\r\n",
       "<text text-anchor=\"middle\" x=\"790.5\" y=\"-37.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 34</text>\r\n",
       "<text text-anchor=\"middle\" x=\"790.5\" y=\"-22.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [33, 1, 0]</text>\r\n",
       "<text text-anchor=\"middle\" x=\"790.5\" y=\"-7.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = class_0</text>\r\n",
       "</g>\r\n",
       "<!-- 10&#45;&gt;12 -->\r\n",
       "<g id=\"edge12\" class=\"edge\"><title>10&#45;&gt;12</title>\r\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M728.364,-103.726C736.61,-94.6054 745.358,-84.93 753.605,-75.8078\"/>\r\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"756.283,-78.0647 760.394,-68.2996 751.091,-73.3701 756.283,-78.0647\"/>\r\n",
       "</g>\r\n",
       "</g>\r\n",
       "</svg>\r\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x23b52df77c0>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dot_data = tree.export_graphviz(clt\n",
    "                    ,feature_names = wine.feature_names\n",
    "                    ,class_names = wine.target_names\n",
    "                    ,filled = True\n",
    "                    ,rounded = True)\n",
    "graph = graphviz.Source(dot_data)\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "6f03bfec",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9596774193548387"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看模型对训练数据的你和程度\n",
    "clt.score(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "56da95ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 9, 12, 11,  9, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12, 12, 12,  9,\n",
       "        3,  7, 11, 12, 12, 12, 12,  3, 12,  6, 12,  6,  4,  9, 12,  4,  3,\n",
       "        3, 11,  9,  9,  9, 12, 12, 12,  7, 12,  3,  9, 12, 12, 12,  9, 12,\n",
       "       11,  3,  3], dtype=int64)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clt.apply(X_test)  # apply返回每个测试样本所在的叶子节点的索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "7e75cb82",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0,\n",
       "       0, 0, 2, 0, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 1, 1, 1, 0, 0, 0, 2, 0,\n",
       "       2, 1, 0, 0, 0, 1, 0, 1, 2, 2])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clt.predict(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8118f08a",
   "metadata": {},
   "source": [
    "# 回归树：交叉验证"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "58643472",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_boston\n",
    "from sklearn.model_selection import cross_val_score\n",
    "from sklearn.tree import DecisionTreeRegressor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "1a1a075f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'data': array([[6.3200e-03, 1.8000e+01, 2.3100e+00, ..., 1.5300e+01, 3.9690e+02,\n",
       "         4.9800e+00],\n",
       "        [2.7310e-02, 0.0000e+00, 7.0700e+00, ..., 1.7800e+01, 3.9690e+02,\n",
       "         9.1400e+00],\n",
       "        [2.7290e-02, 0.0000e+00, 7.0700e+00, ..., 1.7800e+01, 3.9283e+02,\n",
       "         4.0300e+00],\n",
       "        ...,\n",
       "        [6.0760e-02, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9690e+02,\n",
       "         5.6400e+00],\n",
       "        [1.0959e-01, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9345e+02,\n",
       "         6.4800e+00],\n",
       "        [4.7410e-02, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9690e+02,\n",
       "         7.8800e+00]]),\n",
       " 'target': array([24. , 21.6, 34.7, 33.4, 36.2, 28.7, 22.9, 27.1, 16.5, 18.9, 15. ,\n",
       "        18.9, 21.7, 20.4, 18.2, 19.9, 23.1, 17.5, 20.2, 18.2, 13.6, 19.6,\n",
       "        15.2, 14.5, 15.6, 13.9, 16.6, 14.8, 18.4, 21. , 12.7, 14.5, 13.2,\n",
       "        13.1, 13.5, 18.9, 20. , 21. , 24.7, 30.8, 34.9, 26.6, 25.3, 24.7,\n",
       "        21.2, 19.3, 20. , 16.6, 14.4, 19.4, 19.7, 20.5, 25. , 23.4, 18.9,\n",
       "        35.4, 24.7, 31.6, 23.3, 19.6, 18.7, 16. , 22.2, 25. , 33. , 23.5,\n",
       "        19.4, 22. , 17.4, 20.9, 24.2, 21.7, 22.8, 23.4, 24.1, 21.4, 20. ,\n",
       "        20.8, 21.2, 20.3, 28. , 23.9, 24.8, 22.9, 23.9, 26.6, 22.5, 22.2,\n",
       "        23.6, 28.7, 22.6, 22. , 22.9, 25. , 20.6, 28.4, 21.4, 38.7, 43.8,\n",
       "        33.2, 27.5, 26.5, 18.6, 19.3, 20.1, 19.5, 19.5, 20.4, 19.8, 19.4,\n",
       "        21.7, 22.8, 18.8, 18.7, 18.5, 18.3, 21.2, 19.2, 20.4, 19.3, 22. ,\n",
       "        20.3, 20.5, 17.3, 18.8, 21.4, 15.7, 16.2, 18. , 14.3, 19.2, 19.6,\n",
       "        23. , 18.4, 15.6, 18.1, 17.4, 17.1, 13.3, 17.8, 14. , 14.4, 13.4,\n",
       "        15.6, 11.8, 13.8, 15.6, 14.6, 17.8, 15.4, 21.5, 19.6, 15.3, 19.4,\n",
       "        17. , 15.6, 13.1, 41.3, 24.3, 23.3, 27. , 50. , 50. , 50. , 22.7,\n",
       "        25. , 50. , 23.8, 23.8, 22.3, 17.4, 19.1, 23.1, 23.6, 22.6, 29.4,\n",
       "        23.2, 24.6, 29.9, 37.2, 39.8, 36.2, 37.9, 32.5, 26.4, 29.6, 50. ,\n",
       "        32. , 29.8, 34.9, 37. , 30.5, 36.4, 31.1, 29.1, 50. , 33.3, 30.3,\n",
       "        34.6, 34.9, 32.9, 24.1, 42.3, 48.5, 50. , 22.6, 24.4, 22.5, 24.4,\n",
       "        20. , 21.7, 19.3, 22.4, 28.1, 23.7, 25. , 23.3, 28.7, 21.5, 23. ,\n",
       "        26.7, 21.7, 27.5, 30.1, 44.8, 50. , 37.6, 31.6, 46.7, 31.5, 24.3,\n",
       "        31.7, 41.7, 48.3, 29. , 24. , 25.1, 31.5, 23.7, 23.3, 22. , 20.1,\n",
       "        22.2, 23.7, 17.6, 18.5, 24.3, 20.5, 24.5, 26.2, 24.4, 24.8, 29.6,\n",
       "        42.8, 21.9, 20.9, 44. , 50. , 36. , 30.1, 33.8, 43.1, 48.8, 31. ,\n",
       "        36.5, 22.8, 30.7, 50. , 43.5, 20.7, 21.1, 25.2, 24.4, 35.2, 32.4,\n",
       "        32. , 33.2, 33.1, 29.1, 35.1, 45.4, 35.4, 46. , 50. , 32.2, 22. ,\n",
       "        20.1, 23.2, 22.3, 24.8, 28.5, 37.3, 27.9, 23.9, 21.7, 28.6, 27.1,\n",
       "        20.3, 22.5, 29. , 24.8, 22. , 26.4, 33.1, 36.1, 28.4, 33.4, 28.2,\n",
       "        22.8, 20.3, 16.1, 22.1, 19.4, 21.6, 23.8, 16.2, 17.8, 19.8, 23.1,\n",
       "        21. , 23.8, 23.1, 20.4, 18.5, 25. , 24.6, 23. , 22.2, 19.3, 22.6,\n",
       "        19.8, 17.1, 19.4, 22.2, 20.7, 21.1, 19.5, 18.5, 20.6, 19. , 18.7,\n",
       "        32.7, 16.5, 23.9, 31.2, 17.5, 17.2, 23.1, 24.5, 26.6, 22.9, 24.1,\n",
       "        18.6, 30.1, 18.2, 20.6, 17.8, 21.7, 22.7, 22.6, 25. , 19.9, 20.8,\n",
       "        16.8, 21.9, 27.5, 21.9, 23.1, 50. , 50. , 50. , 50. , 50. , 13.8,\n",
       "        13.8, 15. , 13.9, 13.3, 13.1, 10.2, 10.4, 10.9, 11.3, 12.3,  8.8,\n",
       "         7.2, 10.5,  7.4, 10.2, 11.5, 15.1, 23.2,  9.7, 13.8, 12.7, 13.1,\n",
       "        12.5,  8.5,  5. ,  6.3,  5.6,  7.2, 12.1,  8.3,  8.5,  5. , 11.9,\n",
       "        27.9, 17.2, 27.5, 15. , 17.2, 17.9, 16.3,  7. ,  7.2,  7.5, 10.4,\n",
       "         8.8,  8.4, 16.7, 14.2, 20.8, 13.4, 11.7,  8.3, 10.2, 10.9, 11. ,\n",
       "         9.5, 14.5, 14.1, 16.1, 14.3, 11.7, 13.4,  9.6,  8.7,  8.4, 12.8,\n",
       "        10.5, 17.1, 18.4, 15.4, 10.8, 11.8, 14.9, 12.6, 14.1, 13. , 13.4,\n",
       "        15.2, 16.1, 17.8, 14.9, 14.1, 12.7, 13.5, 14.9, 20. , 16.4, 17.7,\n",
       "        19.5, 20.2, 21.4, 19.9, 19. , 19.1, 19.1, 20.1, 19.9, 19.6, 23.2,\n",
       "        29.8, 13.8, 13.3, 16.7, 12. , 14.6, 21.4, 23. , 23.7, 25. , 21.8,\n",
       "        20.6, 21.2, 19.1, 20.6, 15.2,  7. ,  8.1, 13.6, 20.1, 21.8, 24.5,\n",
       "        23.1, 19.7, 18.3, 21.2, 17.5, 16.8, 22.4, 20.6, 23.9, 22. , 11.9]),\n",
       " 'feature_names': array(['CRIM', 'ZN', 'INDUS', 'CHAS', 'NOX', 'RM', 'AGE', 'DIS', 'RAD',\n",
       "        'TAX', 'PTRATIO', 'B', 'LSTAT'], dtype='<U7'),\n",
       " 'DESCR': \".. _boston_dataset:\\n\\nBoston house prices dataset\\n---------------------------\\n\\n**Data Set Characteristics:**  \\n\\n    :Number of Instances: 506 \\n\\n    :Number of Attributes: 13 numeric/categorical predictive. Median Value (attribute 14) is usually the target.\\n\\n    :Attribute Information (in order):\\n        - CRIM     per capita crime rate by town\\n        - ZN       proportion of residential land zoned for lots over 25,000 sq.ft.\\n        - INDUS    proportion of non-retail business acres per town\\n        - CHAS     Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)\\n        - NOX      nitric oxides concentration (parts per 10 million)\\n        - RM       average number of rooms per dwelling\\n        - AGE      proportion of owner-occupied units built prior to 1940\\n        - DIS      weighted distances to five Boston employment centres\\n        - RAD      index of accessibility to radial highways\\n        - TAX      full-value property-tax rate per $10,000\\n        - PTRATIO  pupil-teacher ratio by town\\n        - B        1000(Bk - 0.63)^2 where Bk is the proportion of black people by town\\n        - LSTAT    % lower status of the population\\n        - MEDV     Median value of owner-occupied homes in $1000's\\n\\n    :Missing Attribute Values: None\\n\\n    :Creator: Harrison, D. and Rubinfeld, D.L.\\n\\nThis is a copy of UCI ML housing dataset.\\nhttps://archive.ics.uci.edu/ml/machine-learning-databases/housing/\\n\\n\\nThis dataset was taken from the StatLib library which is maintained at Carnegie Mellon University.\\n\\nThe Boston house-price data of Harrison, D. and Rubinfeld, D.L. 'Hedonic\\nprices and the demand for clean air', J. Environ. Economics & Management,\\nvol.5, 81-102, 1978.   Used in Belsley, Kuh & Welsch, 'Regression diagnostics\\n...', Wiley, 1980.   N.B. Various transformations are used in the table on\\npages 244-261 of the latter.\\n\\nThe Boston house-price data has been used in many machine learning papers that address regression\\nproblems.   \\n     \\n.. topic:: References\\n\\n   - Belsley, Kuh & Welsch, 'Regression diagnostics: Identifying Influential Data and Sources of Collinearity', Wiley, 1980. 244-261.\\n   - Quinlan,R. (1993). Combining Instance-Based and Model-Based Learning. In Proceedings on the Tenth International Conference of Machine Learning, 236-243, University of Massachusetts, Amherst. Morgan Kaufmann.\\n\",\n",
       " 'filename': 'E:\\\\ancoda\\\\lib\\\\site-packages\\\\sklearn\\\\datasets\\\\data\\\\boston_house_prices.csv'}"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boston = load_boston()\n",
    "boston"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "7a256e85",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[6.3200e-03, 1.8000e+01, 2.3100e+00, ..., 1.5300e+01, 3.9690e+02,\n",
       "        4.9800e+00],\n",
       "       [2.7310e-02, 0.0000e+00, 7.0700e+00, ..., 1.7800e+01, 3.9690e+02,\n",
       "        9.1400e+00],\n",
       "       [2.7290e-02, 0.0000e+00, 7.0700e+00, ..., 1.7800e+01, 3.9283e+02,\n",
       "        4.0300e+00],\n",
       "       ...,\n",
       "       [6.0760e-02, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9690e+02,\n",
       "        5.6400e+00],\n",
       "       [1.0959e-01, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9345e+02,\n",
       "        6.4800e+00],\n",
       "       [4.7410e-02, 0.0000e+00, 1.1930e+01, ..., 2.1000e+01, 3.9690e+02,\n",
       "        7.8800e+00]])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boston.data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "881dfe14",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([24. , 21.6, 34.7, 33.4, 36.2, 28.7, 22.9, 27.1, 16.5, 18.9, 15. ,\n",
       "       18.9, 21.7, 20.4, 18.2, 19.9, 23.1, 17.5, 20.2, 18.2, 13.6, 19.6,\n",
       "       15.2, 14.5, 15.6, 13.9, 16.6, 14.8, 18.4, 21. , 12.7, 14.5, 13.2,\n",
       "       13.1, 13.5, 18.9, 20. , 21. , 24.7, 30.8, 34.9, 26.6, 25.3, 24.7,\n",
       "       21.2, 19.3, 20. , 16.6, 14.4, 19.4, 19.7, 20.5, 25. , 23.4, 18.9,\n",
       "       35.4, 24.7, 31.6, 23.3, 19.6, 18.7, 16. , 22.2, 25. , 33. , 23.5,\n",
       "       19.4, 22. , 17.4, 20.9, 24.2, 21.7, 22.8, 23.4, 24.1, 21.4, 20. ,\n",
       "       20.8, 21.2, 20.3, 28. , 23.9, 24.8, 22.9, 23.9, 26.6, 22.5, 22.2,\n",
       "       23.6, 28.7, 22.6, 22. , 22.9, 25. , 20.6, 28.4, 21.4, 38.7, 43.8,\n",
       "       33.2, 27.5, 26.5, 18.6, 19.3, 20.1, 19.5, 19.5, 20.4, 19.8, 19.4,\n",
       "       21.7, 22.8, 18.8, 18.7, 18.5, 18.3, 21.2, 19.2, 20.4, 19.3, 22. ,\n",
       "       20.3, 20.5, 17.3, 18.8, 21.4, 15.7, 16.2, 18. , 14.3, 19.2, 19.6,\n",
       "       23. , 18.4, 15.6, 18.1, 17.4, 17.1, 13.3, 17.8, 14. , 14.4, 13.4,\n",
       "       15.6, 11.8, 13.8, 15.6, 14.6, 17.8, 15.4, 21.5, 19.6, 15.3, 19.4,\n",
       "       17. , 15.6, 13.1, 41.3, 24.3, 23.3, 27. , 50. , 50. , 50. , 22.7,\n",
       "       25. , 50. , 23.8, 23.8, 22.3, 17.4, 19.1, 23.1, 23.6, 22.6, 29.4,\n",
       "       23.2, 24.6, 29.9, 37.2, 39.8, 36.2, 37.9, 32.5, 26.4, 29.6, 50. ,\n",
       "       32. , 29.8, 34.9, 37. , 30.5, 36.4, 31.1, 29.1, 50. , 33.3, 30.3,\n",
       "       34.6, 34.9, 32.9, 24.1, 42.3, 48.5, 50. , 22.6, 24.4, 22.5, 24.4,\n",
       "       20. , 21.7, 19.3, 22.4, 28.1, 23.7, 25. , 23.3, 28.7, 21.5, 23. ,\n",
       "       26.7, 21.7, 27.5, 30.1, 44.8, 50. , 37.6, 31.6, 46.7, 31.5, 24.3,\n",
       "       31.7, 41.7, 48.3, 29. , 24. , 25.1, 31.5, 23.7, 23.3, 22. , 20.1,\n",
       "       22.2, 23.7, 17.6, 18.5, 24.3, 20.5, 24.5, 26.2, 24.4, 24.8, 29.6,\n",
       "       42.8, 21.9, 20.9, 44. , 50. , 36. , 30.1, 33.8, 43.1, 48.8, 31. ,\n",
       "       36.5, 22.8, 30.7, 50. , 43.5, 20.7, 21.1, 25.2, 24.4, 35.2, 32.4,\n",
       "       32. , 33.2, 33.1, 29.1, 35.1, 45.4, 35.4, 46. , 50. , 32.2, 22. ,\n",
       "       20.1, 23.2, 22.3, 24.8, 28.5, 37.3, 27.9, 23.9, 21.7, 28.6, 27.1,\n",
       "       20.3, 22.5, 29. , 24.8, 22. , 26.4, 33.1, 36.1, 28.4, 33.4, 28.2,\n",
       "       22.8, 20.3, 16.1, 22.1, 19.4, 21.6, 23.8, 16.2, 17.8, 19.8, 23.1,\n",
       "       21. , 23.8, 23.1, 20.4, 18.5, 25. , 24.6, 23. , 22.2, 19.3, 22.6,\n",
       "       19.8, 17.1, 19.4, 22.2, 20.7, 21.1, 19.5, 18.5, 20.6, 19. , 18.7,\n",
       "       32.7, 16.5, 23.9, 31.2, 17.5, 17.2, 23.1, 24.5, 26.6, 22.9, 24.1,\n",
       "       18.6, 30.1, 18.2, 20.6, 17.8, 21.7, 22.7, 22.6, 25. , 19.9, 20.8,\n",
       "       16.8, 21.9, 27.5, 21.9, 23.1, 50. , 50. , 50. , 50. , 50. , 13.8,\n",
       "       13.8, 15. , 13.9, 13.3, 13.1, 10.2, 10.4, 10.9, 11.3, 12.3,  8.8,\n",
       "        7.2, 10.5,  7.4, 10.2, 11.5, 15.1, 23.2,  9.7, 13.8, 12.7, 13.1,\n",
       "       12.5,  8.5,  5. ,  6.3,  5.6,  7.2, 12.1,  8.3,  8.5,  5. , 11.9,\n",
       "       27.9, 17.2, 27.5, 15. , 17.2, 17.9, 16.3,  7. ,  7.2,  7.5, 10.4,\n",
       "        8.8,  8.4, 16.7, 14.2, 20.8, 13.4, 11.7,  8.3, 10.2, 10.9, 11. ,\n",
       "        9.5, 14.5, 14.1, 16.1, 14.3, 11.7, 13.4,  9.6,  8.7,  8.4, 12.8,\n",
       "       10.5, 17.1, 18.4, 15.4, 10.8, 11.8, 14.9, 12.6, 14.1, 13. , 13.4,\n",
       "       15.2, 16.1, 17.8, 14.9, 14.1, 12.7, 13.5, 14.9, 20. , 16.4, 17.7,\n",
       "       19.5, 20.2, 21.4, 19.9, 19. , 19.1, 19.1, 20.1, 19.9, 19.6, 23.2,\n",
       "       29.8, 13.8, 13.3, 16.7, 12. , 14.6, 21.4, 23. , 23.7, 25. , 21.8,\n",
       "       20.6, 21.2, 19.1, 20.6, 15.2,  7. ,  8.1, 13.6, 20.1, 21.8, 24.5,\n",
       "       23.1, 19.7, 18.3, 21.2, 17.5, 16.8, 22.4, 20.6, 23.9, 22. , 11.9])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boston.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "6a6b899d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-18.08941176, -10.61843137, -16.31843137, -44.97803922,\n",
       "       -17.12509804, -49.71509804, -12.9986    , -88.4514    ,\n",
       "       -55.7914    , -25.0816    ])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "regressor = DecisionTreeRegressor(random_state=0)\n",
    "cross_val_score(regressor  #模型评估器，任何一个模型都可以\n",
    "               ,boston.data #没有划分的特征数据\n",
    "               ,boston.target #没有划分的标签\n",
    "               ,cv=10 #要划分的份数\n",
    "               ,scoring='neg_mean_squared_error'  #评估标准，默认是R²（越接近1越好），这里是负均方误差，越小越好\n",
    "               )"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "65fd876e",
   "metadata": {},
   "source": [
    "# 用回归树来拟合正弦曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "8f902f19",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn.tree import DecisionTreeRegressor"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "420d413c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-2.44430544, -2.34130788, -2.28944765, -2.22297378, -2.1375429 ,\n",
       "       -2.04297752, -2.01700958, -1.97303332, -1.89071252, -1.89058718,\n",
       "       -1.88194576, -1.67312836, -1.53695644, -1.50372284, -1.44639664,\n",
       "       -1.25406052, -1.25072157, -1.24082827, -1.12998993, -1.10162247,\n",
       "       -0.9987918 , -0.97200079, -0.96161308, -0.95938557, -0.93250464,\n",
       "       -0.9260975 , -0.89417766, -0.85233755, -0.81897323, -0.44652768,\n",
       "       -0.4327752 , -0.37058803, -0.29344914, -0.19408367, -0.17948203,\n",
       "       -0.16582642, -0.07444556,  0.0421342 ,  0.26053237,  0.39446187,\n",
       "        0.40402743,  0.41347599,  0.41488998,  0.42910365,  0.42972006,\n",
       "        0.51161582,  0.51616263,  0.7611707 ,  0.77219636,  0.92242184,\n",
       "        0.93287911,  0.98833714,  1.03192926,  1.06112331,  1.09778004,\n",
       "        1.1722667 ,  1.44185942,  1.47773875,  1.50949255,  1.56869894,\n",
       "        1.6508479 ,  1.67322901,  1.76622055,  1.76635713,  1.79806531,\n",
       "        1.80361826,  1.81262648,  1.84985714,  1.98386997,  1.98832786,\n",
       "        2.00826583,  2.03830703,  2.07477894,  2.23318727,  2.25023271,\n",
       "        2.30472608,  2.36306203,  2.40316521,  2.40855861,  2.49942813])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.seed(1)\n",
    "X = np.sort(5*(0.5 - np.random.rand(80)))\n",
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "68d85614",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.93992685, -0.71755447, -0.75269434, -0.79476415, -0.84365217,\n",
       "       -1.48103282, -0.90208775, -0.92018756, -0.94926178, -0.94930119,\n",
       "        0.35001719, -0.99476865, -0.99942749, -0.99775142, -0.99227233,\n",
       "       -1.71664632, -0.9492119 , -0.94605269, -0.90440789, -0.89194213,\n",
       "       -1.60244614, -0.82601511, -0.82011563, -0.81883903, -0.80311478,\n",
       "       -2.0683544 , -0.77969443, -0.7528211 , -0.73044496, -0.43183628,\n",
       "       -1.05396603, -0.3621636 , -0.28925564, -0.19286749, -0.17851995,\n",
       "        0.96211964, -0.07437681,  0.04212174,  0.25759499,  0.38431145,\n",
       "        1.83348428,  0.40179481,  0.40308924,  0.41605589,  0.41661633,\n",
       "        1.91095384,  0.49354634,  0.68976954,  0.69771035,  0.79706649,\n",
       "        2.21841838,  0.83511243,  0.85829061,  0.87290409,  0.8901982 ,\n",
       "        1.68299939,  0.99169915,  0.99567327,  0.99812151,  0.9999978 ,\n",
       "       -0.08328626,  0.99475836,  0.98096538,  0.98093885,  0.97428537,\n",
       "        0.85652599,  0.97090132,  0.96131456,  0.91589131,  0.9140927 ,\n",
       "        0.74736067,  0.89269289,  0.87566624,  0.78852404,  0.777927  ,\n",
       "       -0.28354466,  0.70223406,  0.67312579,  0.66912745,  0.5989302 ])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = np.sin(X)\n",
    "y[::5] = y[::5] + 3*(0.5-np.random.rand(16))\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "ba4d2a28",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x23b59c25640>"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD4CAYAAADxeG0DAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUd0lEQVR4nO3df4jc9Z3H8dc727E3seLomcPLmDXiSa7a1O4xVI/8cT3bI7ZVu4YKzfVKoQfh4ArVeksTFIyHRwIL/nMWeh5KORQba+PWnh4xkpRy0kg37qZpLqanHmomBVN0aWkG3Kzv+yMzm93J9zs/dr4z3+/nO88HiO7szHc+M2Ne+cz788vcXQCAcK1KuwEAgN4Q5AAQOIIcAAJHkANA4AhyAAjcR9J40iuuuMLXr1+fxlMDQLAOHz78W3df03x7KkG+fv16TU9Pp/HUABAsM3sr6nZKKwAQOIIcAAJHkANA4AhyAAgcQQ4AgUtl1gqAwZqaqWpy3wmdmqtpbamoic0bND5WTrtZSAhBDuTc1ExVO/YeV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Z36fdpgHYJOlrkm6p/1meNbMvpN2oJLBEHwACR48cAAJHkANA4AhyAAgcQQ4AgSPIASBwBDkABI4gB4DA/T/DnAjxCwIrPQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "plt.scatter(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "e7e378f2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2.44430544],\n",
       "       [-2.34130788],\n",
       "       [-2.28944765],\n",
       "       [-2.22297378],\n",
       "       [-2.1375429 ],\n",
       "       [-2.04297752],\n",
       "       [-2.01700958],\n",
       "       [-1.97303332],\n",
       "       [-1.89071252],\n",
       "       [-1.89058718],\n",
       "       [-1.88194576],\n",
       "       [-1.67312836],\n",
       "       [-1.53695644],\n",
       "       [-1.50372284],\n",
       "       [-1.44639664],\n",
       "       [-1.25406052],\n",
       "       [-1.25072157],\n",
       "       [-1.24082827],\n",
       "       [-1.12998993],\n",
       "       [-1.10162247],\n",
       "       [-0.9987918 ],\n",
       "       [-0.97200079],\n",
       "       [-0.96161308],\n",
       "       [-0.95938557],\n",
       "       [-0.93250464],\n",
       "       [-0.9260975 ],\n",
       "       [-0.89417766],\n",
       "       [-0.85233755],\n",
       "       [-0.81897323],\n",
       "       [-0.44652768],\n",
       "       [-0.4327752 ],\n",
       "       [-0.37058803],\n",
       "       [-0.29344914],\n",
       "       [-0.19408367],\n",
       "       [-0.17948203],\n",
       "       [-0.16582642],\n",
       "       [-0.07444556],\n",
       "       [ 0.0421342 ],\n",
       "       [ 0.26053237],\n",
       "       [ 0.39446187],\n",
       "       [ 0.40402743],\n",
       "       [ 0.41347599],\n",
       "       [ 0.41488998],\n",
       "       [ 0.42910365],\n",
       "       [ 0.42972006],\n",
       "       [ 0.51161582],\n",
       "       [ 0.51616263],\n",
       "       [ 0.7611707 ],\n",
       "       [ 0.77219636],\n",
       "       [ 0.92242184],\n",
       "       [ 0.93287911],\n",
       "       [ 0.98833714],\n",
       "       [ 1.03192926],\n",
       "       [ 1.06112331],\n",
       "       [ 1.09778004],\n",
       "       [ 1.1722667 ],\n",
       "       [ 1.44185942],\n",
       "       [ 1.47773875],\n",
       "       [ 1.50949255],\n",
       "       [ 1.56869894],\n",
       "       [ 1.6508479 ],\n",
       "       [ 1.67322901],\n",
       "       [ 1.76622055],\n",
       "       [ 1.76635713],\n",
       "       [ 1.79806531],\n",
       "       [ 1.80361826],\n",
       "       [ 1.81262648],\n",
       "       [ 1.84985714],\n",
       "       [ 1.98386997],\n",
       "       [ 1.98832786],\n",
       "       [ 2.00826583],\n",
       "       [ 2.03830703],\n",
       "       [ 2.07477894],\n",
       "       [ 2.23318727],\n",
       "       [ 2.25023271],\n",
       "       [ 2.30472608],\n",
       "       [ 2.36306203],\n",
       "       [ 2.40316521],\n",
       "       [ 2.40855861],\n",
       "       [ 2.49942813]])"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = X[:,None]\n",
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "75a34d35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DecisionTreeRegressor(max_depth=10)"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.tree import DecisionTreeRegressor\n",
    "DTregressor1 = DecisionTreeRegressor(max_depth=3)\n",
    "DTregressor2 = DecisionTreeRegressor(max_depth=10)\n",
    "DTregressor1.fit(X,y)\n",
    "DTregressor2.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "02fd8737",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2.49884558],\n",
       "       [-2.45827002],\n",
       "       [-2.26560503],\n",
       "       [-2.24488509],\n",
       "       [-2.14061912],\n",
       "       [-2.10508929],\n",
       "       [-1.97348306],\n",
       "       [-1.94687377],\n",
       "       [-1.93460233],\n",
       "       [-1.93420964],\n",
       "       [-1.93249743],\n",
       "       [-1.90171736],\n",
       "       [-1.89827999],\n",
       "       [-1.89635882],\n",
       "       [-1.87255133],\n",
       "       [-1.80594823],\n",
       "       [-1.78236531],\n",
       "       [-1.73894991],\n",
       "       [-1.71243172],\n",
       "       [-1.69418927],\n",
       "       [-1.68901934],\n",
       "       [-1.59802331],\n",
       "       [-1.49830597],\n",
       "       [-1.39319202],\n",
       "       [-1.36157669],\n",
       "       [-1.32061972],\n",
       "       [-1.22660755],\n",
       "       [-1.05547659],\n",
       "       [-0.98002698],\n",
       "       [-0.75026792],\n",
       "       [-0.7386193 ],\n",
       "       [-0.70452628],\n",
       "       [-0.69529486],\n",
       "       [-0.63460972],\n",
       "       [-0.4278933 ],\n",
       "       [-0.41719267],\n",
       "       [-0.37172112],\n",
       "       [-0.36865951],\n",
       "       [-0.27529679],\n",
       "       [-0.11398015],\n",
       "       [-0.07608331],\n",
       "       [-0.00818116],\n",
       "       [ 0.01008346],\n",
       "       [ 0.05150198],\n",
       "       [ 0.07839222],\n",
       "       [ 0.10774827],\n",
       "       [ 0.23677839],\n",
       "       [ 0.3029778 ],\n",
       "       [ 0.46648565],\n",
       "       [ 0.50423302],\n",
       "       [ 0.60576551],\n",
       "       [ 0.71794956],\n",
       "       [ 0.8328037 ],\n",
       "       [ 0.90075541],\n",
       "       [ 0.97100879],\n",
       "       [ 0.97214193],\n",
       "       [ 0.97894587],\n",
       "       [ 1.09208603],\n",
       "       [ 1.12264908],\n",
       "       [ 1.16456224],\n",
       "       [ 1.17725343],\n",
       "       [ 1.35697592],\n",
       "       [ 1.47758479],\n",
       "       [ 1.53269715],\n",
       "       [ 1.60973325],\n",
       "       [ 1.66593093],\n",
       "       [ 1.69031053],\n",
       "       [ 1.69791806],\n",
       "       [ 1.7200375 ],\n",
       "       [ 1.7442198 ],\n",
       "       [ 1.78028578],\n",
       "       [ 1.80642689],\n",
       "       [ 1.860965  ],\n",
       "       [ 1.87859981],\n",
       "       [ 1.96168062],\n",
       "       [ 1.98996177],\n",
       "       [ 2.1578447 ],\n",
       "       [ 2.20275462],\n",
       "       [ 2.24179381],\n",
       "       [ 2.27581704]])"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_val = np.sort(5*(0.5 - np.random.rand(80)))[:,None]\n",
    "X_val"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "d0faf85e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.93992685, -1.93992685, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.93468826, -0.93468826, -0.93468826, -0.93468826,\n",
       "       -0.93468826, -0.32570962, -0.32570962, -0.32570962,  0.15241284,\n",
       "        0.15241284,  0.15241284,  0.15241284,  0.15241284,  0.15241284,\n",
       "        0.15241284,  0.15241284,  0.15241284,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074,\n",
       "        0.83278074,  0.83278074,  0.83278074,  0.83278074,  0.83278074])"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y1 = DTregressor1.predict(X_val)\n",
    "y1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "9803d1ff",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.93992685, -1.93992685, -0.75269434, -0.79476415, -0.84365217,\n",
       "       -0.84365217, -0.92018756, -0.92018756, -0.92018756, -0.92018756,\n",
       "       -0.92018756, -0.94926178, -0.94926178, -0.94926178,  0.35001719,\n",
       "        0.35001719,  0.35001719, -0.99605497, -0.99605497, -0.99605497,\n",
       "       -0.99605497, -0.99605497, -0.99605497, -0.99605497, -0.99605497,\n",
       "       -1.71664632, -0.9476323 , -0.89817501, -0.82601511, -0.73044496,\n",
       "       -0.73044496, -0.73044496, -0.73044496, -0.73044496, -1.05396603,\n",
       "       -1.05396603, -0.3621636 , -0.3621636 , -0.28925564, -0.07437681,\n",
       "       -0.07437681,  0.04212174,  0.04212174,  0.04212174,  0.04212174,\n",
       "        0.04212174,  0.25759499,  0.25759499,  0.41661633,  1.91095384,\n",
       "        0.49354634,  0.68976954,  0.69771035,  0.79706649,  0.86412633,\n",
       "        0.86412633,  0.86412633,  0.86412633,  0.86412633,  1.13369822,\n",
       "        1.13369822,  1.13369822,  1.13369822,  1.13369822,  1.13369822,\n",
       "        0.90227462,  0.90227462,  0.90227462,  0.90227462,  0.90227462,\n",
       "        0.90227462,  0.90227462,  0.90227462,  0.90227462,  0.90227462,\n",
       "        0.90227462,  0.90227462,  0.90227462,  0.90227462,  0.90227462])"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y2 = DTregressor2.predict(X_val)\n",
    "y2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "0f310ce1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x23b5baa8fd0>"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAApQAAAIECAYAAACnqb5/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAxOAAAMTgF/d4wjAAA/tElEQVR4nO3deXic9X33+89vbo2XEdjWSHYcrGUgYIPNYrBsYw4JOCZJSwKcFLKQGvupKSTpwkmc5iLdEq7kadL2SX3SluZJSHCDWJ4Q0lxAm6TJscsSWuyxqM2SsAUsybIDtjSyjTWyNbrnd/4Yj5DkmdGM7hnds7xf16VLWPcsX3uQ9Jnf8v0Za60AAACAqQr4XQAAAAAqG4ESAAAAnhAoAQAA4AmBEgAAAJ4QKAEAAOAJgRIAAACe1PldwMyZM+38+fP9LgMAAABZ7N+/f9haOzPbdd8D5fz589Xb2+t3GQAAAMjCGHMo13WmvAEAAOAJgRIAAACeECgBAADgie9rKAEAQOVKJpOy1vpdBjwyxox+TAWBEgAAFGx4eFg9PT1KJBJ+l4IiMcZo3rx5WrBggQKBwiaxCZQAAKBgPT09Ov3009XY2DjlUS2Ul0QioTfffFPd3d0688wzC7ovgRIAABQkmUwqkUiosbFRdXVEiWrhOI4WLVqkV199VclksqBRSjblAACAgqTXTDIyWX3Sr2mh62IJlAAAAPCEQAkAAABPCJQAAABF8r3vfU833HCDp8d4/PHH9fOf/3z0z11dXWpqavL0mH/+53+uCy64QMuXL9fy5cv14IMPenq8iVhJCwAAvLv2Wum110rz2O96l/Too6V57DL0+OOP69ixY3r/+99ftMf8/Oc/r7/6q7+SJB04cEDnnnuu3v/+96uhoaEoj88IJQAAqArGGH3ta1/TqlWrdNZZZ2nbtm360z/9U1188cVatmyZfvnLX0qS3njjDa1du1YrVqzQsmXLdNttt41uQrnlllv0x3/8x5KkWCymd73rXXrqqaeyPufw8LA++clPavHixVq7dq127tw57vrXv/51rVq1Spdccomuvvpq7du3T5J0xx136KMf/aiuvvpqnX/++br22ms1MDCgPXv26Fvf+pY6Ojq0fPlyffnLXx59rC9+8YtasWKFzj77bP3kJz8p6N9m3rx5o//91ltvyRijZDJZ0GPkZK319WPRokUWAABUjpGREfurX/3KjoyM+F3KOJLsnXfeaa219gc/+IENhUL23/7t36y11v7N3/yNvfHGG6211g4NDdm33nrLWpv6u3zwgx+0Dz300Oi15cuX2x/84Af2Qx/6kP3a176W8zn/4R/+wb7vfe+zw8PDdnBw0K5YscJef/311lpr77//fnvLLbeM/jt1dHTYa6+91lpr7Ze+9CW7cOFC+8Ybb1hrrf30pz9tP/3pT49e+9znPjf6HHv37rWS7MMPP2yttfanP/2pXbx48ej166+/3l500UUZP3p6ekZv9/d///d28eLFNhQK2e9///sZ/z7ZXltJvTZHnmPKGwAAVI2PfexjkqRLLrlEgUBAH/zgByVJK1as0I9+9CNJqT6at99+u5566ilZa3Xw4EEtX75cN9xwg2bNmqWHHnpIK1as0Jo1a3T77bfnfL7HHntMGzduVDAYVDAY1Pr160dHNB9++GF1dnZqxYoVkiTXdeU4zuh9P/ShD+kd73iHJOnWW2/VRz/60azPU19fr+uuu06StGbNGr02ZnnBD3/4w7z+bW677TbddtttevbZZ7V+/XpdddVVamxszOu+kyFQAgCAqjFr1ixJqSbdM2fOHP264zgaGRmRJG3ZskX9/f3auXOnZs2apc2bN+v48eOjt33ppZdUX1+vgwcPanh4eNzjTGRz9Gu01uov/uIvtGnTprxqz9XXM/33Sv9dXNcd/fMNN9ygX//61xnv96//+q9qaWkZ97WLLrpIixYt0uOPP67rr78+r9omwxpKAEDNsNZqV1dMD3Xu066uWMHNm1EdBgYGtHDhQs2aNUtvvvmmHnroodFrPT09+oM/+ANt27ZNq1at0mc+85mcj7Vu3Trde++9GhkZ0dDQkB544IHRa9dee62++c1vKhaLSUodbbh79+7R6z/+8Y918OBBSdLdd9+tq666SpI0Z84cHTlyJO+/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2+FoacjDFLJH1PUqOko5I2Wmt/6WtRyJsx5p8kXSdpoaQ+ScestWf7WxUKYYxpVmq24HVJb5388glr7Wr/qqoNBEoAAAB4wpQ3AAAAPCFQAgAAwBMCJQAAADwhUAIAAMATAiUAAAA8IVACAADAEwIlAAAAPCFQAgAAwJP/HwdZtAPZ6T5RAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 800x640 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(10,8),dpi=80)\n",
    "plt.scatter(X,y,label = \"data\")\n",
    "plt.plot(X_val,y1,\"red\",label = \"max_depth=3\")\n",
    "# plt.plot(X_val,y1,\"yellow\",label = \"max_depth=5\")\n",
    "plt.legend()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
